Fetch Browser Information in ASP .NET

Now a days, we have many browsers to choose from to surf the internet.  Each one is different from the others, by having its own unique style to deliver the web pages and web content etc. So, these things make a web site or web application accessible using any kind of browser.

From a developer's point of view, the web site or web application should be compatible with all the browsers available on the market today. So, we have to make a web page or web site dynamically changeable depending open the Browser Compatibility level.  

Here, I have explained how to find the browser details based on the request we receive in the server.

Step 1 : Create a web page in your Web Site Solution, and create labels or div elements or some other controls to display the Browser Details. Here, I have used div element to show the Browser Details.


Step 2 : In the Page_Load () Event handler of the Web Page, get the browser details from the HttpRequest Headers and show.


Step 3 :  Run the Web Page to see details.


Note: You can get most anything about the browser and platform that the browser is currently running, using the Request.Browser Property.You can find the article at http://www.iamprabhuraja.com/2013/07/19/fetch-browser-information-in-asp-net

Up Next
    Ebook Download
    View all
    View all