Browser Detection in ASP.NET Demo

This demo illustrates how to do browser detection from an ASP.NET Web page.


Your browser is: Unknown, Unknown

Here is your browser's information:
Type = Unknown
Name = Unknown
Version = 0.0
Major Version = 0
Minor Version = 0
Platform = Unknown
Is Beta = False
Is Crawler = False
Is AOL = False
Is Win16 = False
Is Win32 = False
Supports Frames = False
Supports Tables = False
Supports Cookies = True
Supports VB Script = False
Supports JavaScript = False
Supports Java Applets = False
Supports ActiveX Controls = False
CDF = False


<script language="VB" runat="server">

  Sub Page_Load(sender as Object, e as EventArgs)
    ltlBrowserName.Text = Request.Browser.Type & ", " & Request.Browser.Platform
    
	ltlAllData.Text = "Type = " & Request.Browser.Type & "<br>"
	ltlAllData.Text &= "Name = " & Request.Browser.Browser & "<br>"
	ltlAllData.Text &= "Version = " & Request.Browser.Version & "<br>"
	ltlAllData.Text &= "Major Version = " & Request.Browser.MajorVersion & "<br>"
	ltlAllData.Text &= "Minor Version = " & Request.Browser.MinorVersion & "<br>"
	ltlAllData.Text &= "Platform = " & Request.Browser.Platform & "<br>"
	ltlAllData.Text &= "Is Beta = " & Request.Browser.Beta & "<br>"
	ltlAllData.Text &= "Is Crawler = " & Request.Browser.Crawler & "<br>"
	ltlAllData.Text &= "Is AOL = " & Request.Browser.AOL & "<br>"
	ltlAllData.Text &= "Is Win16 = " & Request.Browser.Win16 & "<br>"
	ltlAllData.Text &= "Is Win32 = " & Request.Browser.Win32 & "<br>"
	ltlAllData.Text &= "Supports Frames = " & Request.Browser.Frames & "<br>"
	ltlAllData.Text &= "Supports Tables = " & Request.Browser.Tables & "<br>"
	ltlAllData.Text &= "Supports Cookies = " & Request.Browser.Cookies & "<br>"
	ltlAllData.Text &= "Supports VB Script = " & Request.Browser.VBScript & "<br>"
	ltlAllData.Text &= "Supports JavaScript = " & Request.Browser.JavaScript & "<br>"
	ltlAllData.Text &= "Supports Java Applets = " & Request.Browser.JavaApplets & "<br>"
	ltlAllData.Text &= "Supports ActiveX Controls = " & Request.Browser.ActiveXControls & "<br>"
	ltlAllData.Text &= "CDF = " & Request.Browser.CDF & "<br>"      
  End Sub

</script>

Your browser is: <asp:literal id="ltlBrowserName" runat="server" />
<p>
<b><u>Here is your browser's information:</u></b><br />
<asp:literal runat="server" id="ltlAllData" />


[Return to the article]