Check Browser version and vendor(C#) : Browser « Request « ASP.Net






Check Browser version and vendor(C#)

<%@ Page Language="c#" %>
<script Language="c#" runat="server">
  void Page_Load(object source, EventArgs e)
  {
    if (!(IsPostBack))
    {  
      if (Request.Browser.Browser == "IE")
      {
        if (Request.Browser.MajorVersion < 6)
        {
           MyLabel.Text = "Time to upgrade Internet Explorer!";
        }
        else
        {
          MyLabel.Text = "Your copy of Internet Explorer is up to date.";
        }
      }
      else
      {
        MyLabel.Text = "You're not using Internet Explorer";
      }
    }
  }
</script>
<html>
  <body>
    <asp:Label id=MyLabel runat="server" Text=""/>
  </body>
</html>

           
       








Related examples in the same category

1.Assign value to browser title bar (C#)
2.Use Browser property in Request object (C#)
3.Is your browser a beta one (VB.net)
4.Browser name, major version and minor version (VB.net)
5.Request.Browser.ActiveXControls: client supports activex? (VB.net)
6.Request.Browser.Frames: browser supports frames (VB.net)
7.Check Browser version and name (VB.net)
8.Get Browser Information: AOL, JavaScript enabled, Browser type and tables enabled (VB.net)