Check Browser version and name (VB.net) : Browser « Request « ASP.Net






Check Browser version and name (VB.net)

<%@ Page Language="VB" %>
<script language="vb" runat="server">
  Sub Page_Load(Source As Object, E as EventArgs)
    If Not IsPostBack Then
      If Request.Browser.Browser = "IE" Then
         If Request.Browser.MajorVersion < 6 Then
           MyLabel.Text = "Time to upgrade Internet Explorer!"
        Else
          MyLabel.Text = "Your copy of Internet Explorer is up to date."
        End If
      Else
        MyLabel.Text = "You're not using Internet Explorer"
      End If
    End If
  End Sub
</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 vendor(C#)
8.Get Browser Information: AOL, JavaScript enabled, Browser type and tables enabled (VB.net)