Click here to Skip to main content
15,897,187 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How can I write below java code in my web site which designed by c#

XML
<script type="text/javascript"> 
txt = "Browser CodeName: " + navigator.appCodeName; 
txt+= "Browser Name: " + navigator.appName; 
txt+= "Browser Version: " + navigator.appVersion; 
txt+= "Cookies Enabled: " + navigator.cookieEnabled; 
txt+= "Platform: " + navigator.platform; 
txt+= "User-agent header: " + navigator.userAgent; 
document.getElementById("example").innerHTML=txt;
</script>
Posted
Updated 9-May-11 0:54am
v3
Comments
Sandeep Mewara 9-May-11 7:16am    
Not clear. You want this in C# server code or totally move to client side page?

1 solution

Paste it into the .aspx page of your choice and make sure you've got a HtmlElement ID'd with "example" on the same page.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900