Getting Browser Information and Capabilities in ASP.Net

While developing a web site or web application, one need to keep in mind the features supported by different browsers. This is very unfortunate that there is no industry standard in the browser market. Fortunately provides HttpBroserCapability class to determine the browser type and features supported by the browser.

The browser property of request object returns the object of HttpBrowserCapability object. This object has several properties which provide the information about the browser type, version and features supported by this.

Following C# code explains how you can use HttpBrowserCapability class to fetch browser information.

private void btnBrowserInfo_Click(object sender, System.EventArgs e)
System.Web.HttpBrowserCapabilities browser = Request.Browser;
string s = “Browser Capabilities\n”
+ “Type = ”                    + browser.Type + “\n”
+ “Name = ”                    + browser.Browser + “\n”
+ “Version = ”                 + browser.Version + “\n”
+ “Major Version = ”           + browser.MajorVersion + “\n”
+ “Minor Version = ”           + browser.MinorVersion + “\n”
+ “Platform = ”                + browser.Platform + “\n”
+ “Is Beta = ”                 + browser.Beta + “\n”
+ “Is Crawler = ”              + browser.Crawler + “\n”
+ “Is AOL = ”                  + browser.AOL + “\n”
+ “Is Win16 = ”                + browser.Win16 + “\n”
+ “Is Win32 = ”                + browser.Win32 + “\n”
+ “Supports Frames = ”         + browser.Frames + “\n”
+ “Supports Tables = ”         + browser.Tables + “\n”
+ “Supports Cookies = ”        + browser.Cookies + “\n”
+ “Supports VBScript = ”       + browser.VBScript + “\n”
+ “Supports JavaScript = ”     +
browser.EcmaScriptVersion.ToString() + “\n”
+ “Supports Java Applets = ”   + browser.JavaApplets + “\n”
+ “Supports ActiveX Controls = ” + browser.ActiveXControls
+ “\n”;
txtBrowserInfo.Text = s;

I have placed one button on the aspx page and named it as Browser Information. The id of the button is btnBrowserInfo. On the click event of the button, I wrote the above code.

I also placed a TextBox on the page and named it as txtBrowserInfo.

First I initialized an HttpBrowserCapability object named browser with the Request object’s browser property. I fetched the different property of browser and concatenate these into a string variable. Finally I displayed the concatenated string into the text box.

kick it on


Impact Of Economic Slowdown On Existing IT Projects

In my last post I discussed the impact of US economical crises on Indian IT firms. In this post, I will discuss the impact of slowdown on the existing projects. Existing projects that are going on since long time or that has been awarded but not started will also have negative impacts of the US slowdown. And not only US slowdown, the world wide economic crises will result in the financial cut down and increased number of firings.

To summarize my thoughts on current developments, I should say that:

1. Fresh negotiations on the payout will take place on downward side. In the view of financial crises, companies will start fresh negotiations on the payout and expenses of existing projects.

2. Kick off dates for the new projects will be delayed.

3. Contracts may takes more time to be awarded as companies will wait for the market to be stable.

4. Start dates will get deferred. Those projects, whose contracts has already been finalized, will face delay in the starting date. These will go on hold as the priorities of the companies has got changed now.

5. Consolidations and mergers of banks like the Bank of America’s buyout of Merill Lynch would lead to the reduced budget for IT spending. Merger will result in the duplication of outsourced deals to domestic IT firms, and consequently truncation of some deals, which will result in loss of revenue.

6. Reduction in on site jobs. Since calling people on site from India costs more to companies, these will prefer to get their work done from offshore.

Manmohan Singh, the Prime Minister of India, yesterday said that India will not remain un-touched with the world wide economic crises. According to him, Indian economy will be badly affected in the long run.

Related Link: