This tutorial will show you how to gather your web browser capabilities using ASP.NET 2.0.The class of HttpBrowserCapabilities will enable
the server to gather information on the capabilities of the browser
that is running on the client. Namespace of this class: System.Web .
To show browser capabilities using ASP.NET 2.0
This tutorial will show you how to gather your web browser capabilities using ASP.NET and VB.NET 2.0.
The class of HttpBrowserCapabilities will enable the server
to gather information on the capabilities of the browser that is
running on the client. Namespace of this class: System.Web .
First, import the namespace of System.Web,
Yes, it is possible to find a good web host. Sometimes it takes a while. After trying several, we went with Server Intellect
and have been very happy. They are the most professional, customer
service friendly and technically knowledgeable host we've found so far.
In order to use the class of HttpBrowserCapabilities, we need
initialize an instance of Request.Browser object. Then we can use this
class to list IE properties.
| Dim bc As HttpBrowserCapabilities = Request.Browser
Label1.Text = "Welcome! You are using" + bc.Browser + "v." + bc.Version + "on a" + bc.Platform + "machine"
ActiveControls.Text = bc.ActiveXControls.ToString()
AOL.Text = bc.AOL.ToString()
Beta.Text = bc.Beta.ToString()
BackgroundSounds.Text = bc.BackgroundSounds.ToString()
Browser.Text = bc.Browser.ToString()
CDF.Text = bc.CDF.ToString()
Cookies.Text = bc.Cookies.ToString()
Crawler.Text = bc.Crawler.ToString()
Frames.Text = bc.Frames.ToString()
JavaApplets.Text = bc.JavaApplets.ToString()
EcmaScriptVersion.Text = bc.EcmaScriptVersion.ToString()
win16.Text = bc.Win16.ToString()
Version.Text = bc.Version.ToString()
VBScript.Text = bc.VBScript.ToString()
win32.Text = bc.Win32.ToString()
Type.Text = bc.Type.ToString()
Tables.Text = bc.Tables.ToString()
Platform.Text = bc.Platform.ToString()
MajorVersion.Text = bc.MajorVersion.ToString()
MinorVersion.Text = bc.MinorVersion.ToString()
MsDomVersion.Text = bc.MSDomVersion.ToString()
|
We used over 10 web hosting companies before we found Server Intellect. Their dedicated servers
and add-ons were setup swiftly, in less than 24 hours. We were able to
confirm our order over the phone. They respond to our inquiries within
an hour. Server Intellect's customer support and assistance are the best we've ever experienced.
The front end Default.aspx page looks something like this:
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Using Performance Counters</title>
</head>
<body>
<form id="form1" runat="server">
<br />
<asp:Label ID="Label1" runat="server" Width="709px"></asp:Label>
<br />
<br />
<asp:Table ID="Table1" runat="server" Height="186px" Width="245px">
<asp:TableRow runat="server">
<asp:TableCell runat="server" Text="Propety" Width="50%" />
<asp:TableCell runat="server" Text="Value" Width="50%" />
</asp:TableRow>
<asp:TableRow runat="server">
<asp:TableCell runat="server">ActiveControls:</asp:TableCell>
<asp:TableCell ID="ActiveControls" runat="server"></asp:TableCell>
</asp:TableRow>
<asp:TableRow runat="server">
<asp:TableCell runat="server">AOL:</asp:TableCell>
<asp:TableCell ID="AOL" runat="server"></asp:TableCell>
</asp:TableRow>
<asp:TableRow runat="server">
<asp:TableCell runat="server">BackgroundSounds:</asp:TableCell>
<asp:TableCell ID="BackgroundSounds" runat="server"></asp:TableCell>
</asp:TableRow>
<asp:TableRow runat="server">
<asp:TableCell runat="server">Beta:</asp:TableCell>
<asp:TableCell ID="Beta" runat="server"></asp:TableCell>
</asp:TableRow>
<asp:TableRow runat="server">
<asp:TableCell runat="server">Browser:</asp:TableCell>
<asp:TableCell ID="Browser" runat="server"></asp:TableCell>
</asp:TableRow>
<asp:TableRow runat="server">
<asp:TableCell runat="server">CDF:</asp:TableCell>
<asp:TableCell ID="CDF" runat="server"></asp:TableCell>
</asp:TableRow>
<asp:TableRow runat="server">
<asp:TableCell runat="server">Cookies:</asp:TableCell>
<asp:TableCell ID="Cookies" runat="server"></asp:TableCell>
</asp:TableRow>
<asp:TableRow runat="server">
<asp:TableCell runat="server">Crawler:</asp:TableCell>
<asp:TableCell ID="Crawler" runat="server"></asp:TableCell>
</asp:TableRow>
<asp:TableRow runat="server">
<asp:TableCell runat="server">EcmaScriptVersion:</asp:TableCell>
<asp:TableCell ID="EcmaScriptVersion" runat="server"></asp:TableCell>
</asp:TableRow>
<asp:TableRow runat="server">
<asp:TableCell runat="server">Frames:</asp:TableCell>
<asp:TableCell ID="Frames" runat="server"></asp:TableCell>
</asp:TableRow>
<asp:TableRow runat="server">
<asp:TableCell runat="server">JavaApplets:</asp:TableCell>
<asp:TableCell ID="JavaApplets" runat="server"></asp:TableCell>
</asp:TableRow>
<asp:TableRow runat="server">
<asp:TableCell runat="server">Win16:</asp:TableCell>
<asp:TableCell ID="win16" runat="server"></asp:TableCell>
</asp:TableRow>
<asp:TableRow runat="server">
<asp:TableCell runat="server">Version:</asp:TableCell>
<asp:TableCell ID="Version" runat="server"></asp:TableCell>
</asp:TableRow>
<asp:TableRow runat="server">
<asp:TableCell runat="server">VBScript:</asp:TableCell>
<asp:TableCell ID="VBScript" runat="server"></asp:TableCell>
</asp:TableRow>
<asp:TableRow runat="server">
<asp:TableCell runat="server">Win32:</asp:TableCell>
<asp:TableCell ID="win32" runat="server"></asp:TableCell>
</asp:TableRow>
<asp:TableRow runat="server">
<asp:TableCell runat="server">Type:</asp:TableCell>
<asp:TableCell ID="Type" runat="server"></asp:TableCell>
</asp:TableRow>
<asp:TableRow runat="server">
<asp:TableCell runat="server">Tables:</asp:TableCell>
<asp:TableCell ID="Tables" runat="server"></asp:TableCell>
</asp:TableRow>
<asp:TableRow runat="server">
<asp:TableCell runat="server">Platform:</asp:TableCell>
<asp:TableCell ID="Platform" runat="server"></asp:TableCell>
</asp:TableRow>
<asp:TableRow runat="server">
<asp:TableCell runat="server">MajorVersion:</asp:TableCell>
<asp:TableCell ID="MajorVersion" runat="server"></asp:TableCell>
</asp:TableRow>
<asp:TableRow runat="server">
<asp:TableCell runat="server">MinorVersion:</asp:TableCell>
<asp:TableCell ID="MinorVersion" runat="server"></asp:TableCell>
</asp:TableRow>
<asp:TableRow runat="server">
<asp:TableCell runat="server">MsDomVersion:</asp:TableCell>
<asp:TableCell ID="MsDomVersion" runat="server"></asp:TableCell>
</asp:TableRow>
</asp:Table>
</form>
</body>
</html>
|
|