To Show Browser Information Using ASP.NET.

Gopesh9
Posted by Gopesh9 under ASP.NET category on | Points: 40 | Views : 1571
Response.Write("Browser type "+ browserDetection.Type+"<br>");
Response.Write("Browser name " + browserDetection.Browser + "<br>");
Response.Write("Browser version " + browserDetection.Version + "<br>");
Response.Write("Cookie support "+ browserDetection.Cookies.ToString());
Response.Write("Browser JavaScript Version"+ browserDetection.EcmaScriptVersion.ToString());

Comments or Responses

Posted by: Srilu.Nayini577 on: 8/14/2012 Level:Starter | Status: [Member] | Points: 10
Hi Gopesh,

Can you tell the namespaces in which browserDetection exists.I didnot get in my system.


Thank you,
Posted by: Gopesh9 on: 8/14/2012 Level:Starter | Status: [Member] | Points: 10
You have to add this before using the above code...
System.Web.HttpBrowserCapabilities browserDetection = Request.Browser;
Posted by: Srilu.Nayini577 on: 8/14/2012 Level:Starter | Status: [Member] | Points: 10
Hi,

Thanks for your response.Now it works fine.

Thank you,

Login to post response