This article is quoted from the VS help document querying the Browser property.
This property contains an HttpBrowserCapabilities object.
During an HTTP request, this object obtains information from the browser or client device,
To let your application know the type and level of support provided by the browser or client device.
The object then exposes information about the browser's capabilities using strongly typed properties and a dictionary of generic name values.
The following code example demonstrates how to display browser information in a text box on the page.
=======
Visual Basic
=======
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Dim s As String = ""
With Request.Browser
s &= "Browser Capabilities" & vbCrLf
s &= "Type = " & .Type & vbCrLf
s &= "Name = " & .Browser & vbCrLf
s &= "Version = " & .Version & vbCrLf
s &= "Major Version = " & .MajorVersion & vbCrLf
s &= "Minor Version = " & .MinorVersion & vbCrLf
s &= "Platform = " & .Platform & vbCrLf
s &= "Is Beta = " & .Beta & vbCrLf
s &= "Is Crawler = " & .Crawler & vbCrLf
s &= "Is AOL = " & .AOL & vbCrLf
s &= "Is Win16 = " & .Win16 & vbCrLf
s &= "Is Win32 = " & .Win32 & vbCrLf
s &= "Supports Frames = " & .Frames & vbCrLf
s &= "Supports Tables = " & .Tables & vbCrLf
s &= "Supports Cookies = " & .Cookies & vbCrLf
s &= "Supports VBScript = " & .VBScript & vbCrLf
s &= "Supports JavaScript = " & _
.EcmaScriptVersion.ToString() & vbCrLf
s &= "Supports Java Applets = " & .JavaApplets & vbCrLf
s &= "Supports ActiveX Controls = " & .ActiveXControls & _
wxya
End With
TextBox1.Text = s
End Sub
=====
C#
=====
private void Button1_Click(object sender, System.EventArgs e)
{
System.Web.HttpBrowserCapabilities browser = Request.Browser;
string s = "Browser Capabilities<br />"
+ "Type = " + browser.Type + "<br />"
+ "Name = " + browser.Browser + "<br />"
+ "Version = " + browser.Version + "<br />"
+ "Major Version = " + browser.MajorVersion + "<br />"
+ "Minor Version = " + browser.MinorVersion + "<br />"
+ "Platform = " + browser.Platform + "<br />"
+ "Is Beta = " + browser.Beta + "<br />"
+ "Is Crawler = " + browser.Crawler + "<br />"
+ "Is AOL = " + browser.AOL + "<br />"
+ "Is Win16 = " + browser.Win16 + "<br />"
+ "Is Win32 = " + browser.Win32 + "<br />"
+ "Supports Frames = " + browser.Frames + "<br />"
+ "Supports Tables = " + browser.Tables + "<br />"
+ "Supports Cookies = " + browser.Cookies + "<br />"
+ "Supports VBScript = " + browser.VBScript + "<br />"
+ "Supports JavaScript = " +
browser.EcmaScriptVersion.ToString() + "<br />"
+ "Supports Java Applets = " + browser.JavaApplets + "<br />"
+ "Supports ActiveX Controls = " + browser.ActiveXControls
+ "<br />";
Response.Write(s);
}