Browser and Operating System Detection In ASP.NET

יום שני, ינואר 26, 2009

Hi, Detect user Browser and Operating System version in ASP.NET is very simple using the C# code: Request.Browser This code retuns the HttpBrowserCapabilities class that has the information we desire. Unfortunately the default Browser Caps configuration that come with ASP.NET 2.0 does not include browsers like Google Chrome and I could not find a way of getting the operating system version. Finally I came up with solution that solve my problem as describe below: On my ASP.NET application I open new ASP.NET folder: App_Browsers. I download updated *.browser files that contain the information on the Google Chrome browser and also the operating system version and copy them to the App_Browsers folder. You can get...