HttpRequest.Browser Property
.NET Framework 2.0
Gets or sets information about the requesting client's browser capabilities.
Namespace: System.Web
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
public: property HttpBrowserCapabilities^ Browser { HttpBrowserCapabilities^ get (); void set (HttpBrowserCapabilities^ value); }
/** @property */ public HttpBrowserCapabilities get_Browser () /** @property */ public void set_Browser (HttpBrowserCapabilities value)
public function get Browser () : HttpBrowserCapabilities public function set Browser (value : HttpBrowserCapabilities)
Property Value
An HttpBrowserCapabilities object listing the capabilities of the client's browser.The following code example sends a list of the browser's capabilities back to the client in an HTML page.
HttpBrowserCapabilities bc = get_Request().get_Browser();
get_Response().Write("<p>Browser Capabilities:</p>");
get_Response().Write(("Type = " + bc.get_Type() + "<br>"));
get_Response().Write(("Name = " + bc.get_Browser() + "<br>"));
get_Response().Write(("Version = " + bc.get_Version() + "<br>"));
get_Response().Write(("Major Version = " + bc.get_MajorVersion()
+ "<br>"));
get_Response().Write(("Minor Version = " + bc.get_MinorVersion()
+ "<br>"));
get_Response().Write(("Platform = " + bc.get_Platform() + "<br>"));
get_Response().Write(("Is Beta = " + bc.get_Beta() + "<br>"));
get_Response().Write(("Is Crawler = " + bc.get_Crawler() + "<br>"));
get_Response().Write(("Is AOL = " + bc.get_AOL() + "<br>"));
get_Response().Write(("Is Win16 = " + bc.get_Win16() + "<br>"));
get_Response().Write(("Is Win32 = " + bc.get_Win32() + "<br>"));
get_Response().Write(("Supports Frames = " + bc.get_Frames() + "<br>"));
get_Response().Write(("Supports Tables = " + bc.get_Tables() + "<br>"));
get_Response().Write(("Supports Cookies = " + bc.get_Cookies()
+ "<br>"));
get_Response().Write(("Supports VB Script = " + bc.get_VBScript()
+ "<br>"));
get_Response().Write(("Supports JavaScript = " + bc.get_JavaScript()
+ "<br>"));
get_Response().Write(("Supports Java Applets = "
+ bc.get_JavaApplets() + "<br>"));
get_Response().Write(("Supports ActiveX Controls = "
+ bc.get_ActiveXControls() + "<br>"));
get_Response().Write(("CDF = " + bc.get_CDF() + "<br>"));
var bc : HttpBrowserCapabilities = Request.Browser Response.Write("<p>Browser Capabilities:</p>") Response.Write("Type = " + bc.Type + "<br>") Response.Write("Name = " + bc.Browser + "<br>") Response.Write("Version = " + bc.Version + "<br>") Response.Write("Major Version = " + bc.MajorVersion + "<br>") Response.Write("Minor Version = " + bc.MinorVersion + "<br>") Response.Write("Platform = " + bc.Platform + "<br>") Response.Write("Is Beta = " + bc.Beta + "<br>") Response.Write("Is Crawler = " + bc.Crawler + "<br>") Response.Write("Is AOL = " + bc.AOL + "<br>") Response.Write("Is Win16 = " + bc.Win16 + "<br>") Response.Write("Is Win32 = " + bc.Win32 + "<br>") Response.Write("Supports Frames = " + bc.Frames + "<br>") Response.Write("Supports Tables = " + bc.Tables + "<br>") Response.Write("Supports Cookies = " + bc.Cookies + "<br>") Response.Write("Supports VB Script = " + bc.VBScript + "<br>") Response.Write("Supports JavaScript = " + bc.JavaScript + "<br>") Response.Write("Supports Java Applets = " + bc.JavaApplets + "<br>") Response.Write("Supports ActiveX Controls = " + bc.ActiveXControls + "<br>") Response.Write("CDF = " + bc.CDF + "<br>")
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Community Additions
ADD
Show: