How to detect browser information and operating system user using in asp.net

Posted by Bhanubysani under ASP.NET on 8/10/2011 | Points: 10 | Views : 2502 | Status : [Member] | Replies : 1
hi i have written a javascript code for detecting the browser information and operating system user using..but it is dispalying browser code anme mozilla for all browsers.

<script type="text/javascript">

txt = "<p>Browser CodeName: " + navigator.appCodeName + "</p>";
txt += "<p>Browser Name: " + navigator.appName + "</p>";
txt += "<p>Browser Version: " + navigator.appVersion + "</p>";
txt += "<p>Cookies Enabled: " + navigator.cookieEnabled + "</p>";
txt += "<p>Platform: " + navigator.platform + "</p>";
txt += "<p>User-agent header: " + navigator.userAgent + "</p>";

document.getElementById("example").innerHTML = txt;

&lt;/script&gt;
i wrote the above javascript..there is any built in fiunctions for detecting browser name in .net

plz help me in getting this..

using this:--
------------
lblbrowserName.Text = Request.Browser.Type.ToString() + "." + Request.Browser.MinorVersion.ToString();

but in case iam using chrome it is not dispalying as chrome

Regards,
Bhanu Prakash Bysani



Responses

Posted by: A4u_6178 on: 8/10/2011 [Member] Starter | Points: 25

Up
0
Down
Use
Request.UserAgent


Thanks & Regards,

Bhanubysani, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response