Aspdotnet-Suresh

aspdotnet-suresh offers C#.net articles and tutorials,csharp dot net,asp.net articles and tutorials,VB.NET Articles,Gridview articles,code examples of asp.net 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

jQuery Get/Detect Browser Type and Version in Asp.net

Oct 28, 2012
Introduction:

In this article I will explain how to find or detect browser type, browser name, browser version in 
JQuery using asp.net.

Description:
  
In previous posts I explained jQuery move to particular div when click on link,
how to find client machine IP using jquery in asp.nt, jQuery increase or decrease website font  and many articles relating to JQuery. Now I will explain how to find or detect browser type and version using JQuery in asp.net. To implement this one we need to write the code as shown below


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>jQuery Find or Detect Browser Type in Asp.net</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<form id="form1" runat="server">
<table>
<tr><td> You Are Using Browser:</td>
<td><label id="lbltype" style=" font-size:xx-large; font-weight:bold" /></td></tr>
<tr><td align="right"> Version:</td>
<td><label id="lblVersion" style=" font-size:xx-large; font-weight:bold" /></td></tr>
</table>
<script type="text/javascript">
$(document).ready(function() {
$('#lbltype').text(jQuery.uaMatch(navigator.userAgent).browser);
$('#lblVersion').text($.browser.version);
})
</script>
</form>
</body>
</html>
Live Demo

Check below output it will display your browser type and version of your browser

You Are Using Browser:
Version:

If you enjoyed this post, please support the blog below. It's FREE!

Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email

6 comments :

Prashant said...

Not working in IE9

Suresh Dasari said...

@Prasanth....
i tested in all the browsers. it's working fine. check your code....and for your information in IE it will display name like msie that mean microsoft internet explorer

Prashant said...

Yes, Right, working when running on localhost. But its showing msie 7.0 on this page in Live Demo given by you !!

Anonymous said...

please how can i redirect mobile users from my site to mobile site?.

Anonymous said...

Demo link is not working

Anonymous said...

not working

Give your Valuable Comments

Note: Only a member of this blog may post a comment.

© 2015 Aspdotnet-Suresh.com. All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.