The user is able to access the Httpbrowesercapabilities property using the browser property of the request's object to obtain which type of browser is currently being used to browse the Web page and to obtain whether the browser supports certain features. Here's an example of this.
The following example obtains browser information primarily through the browser property of the Request object.
The steps for program implementation are as follows:
Create a new Web site default home page Default.aspx. In Default.aspx Page_Load events, first define the Httpbrowser-capabilities class object to get the property return value of the browser of the Request object property. The code is as follows:
protected void Page_Load (object sender, EventArgs e)
{
HttpBrowserCapabilities B = request.browser;
Response.Write ("client browser information");
Response.Write ("Response.Write ("Type:" +b.type+ "<br>");
Response.Write ("Name:" +b.browser+ "<br>");
Response.Write ("Version:" +b.version+ "<br>");
Response.Write ("Operating Platform:" +b.platform+ "<br>");
Response.Write ("Support Framework:" +b.frames+ "<br>");
Response.Write ("Support form" +b.tables+ "<br>");
Response.Write ("Whether to support Cookies" +b.cookies+ "<br>");
Response.Write (" }