|
|
Home » ASP » Article
HTTP Browser Capabilities with ASP.NET
|
| Article by: | Robin Smith (6/25/2002) |
|
| Sponsored by: | FindMyHosting - Web Hosting Search |
| Summary: | Use the httpbrowser object to read the capabilities of the user's browser |
|
| Viewed: 15157 times |
Rating (4 votes): |
|
4 out of 5 |
|
|
|
Using the httpbrowser object you can view the surfer's browser capabilities and respond accordingly.
<%@ Page Language="C#" %>
<html>
<body>
<table width="90%" border="0" align="center"
cellpadding="2" cellspacing="2">
<tr>
<td>Property</td>
<td>Value</td>
</tr>
<tr>
<td>ActiveXControls </td>
<td> <%= Request.Browser.ActiveXControls %></td>
</tr>
<tr>
<td>AOL </td>
<td> <%= Request.Browser.AOL %></td>
</tr>
<tr>
<td>BackgroundSounds </td>
<td> <%= Request.Browser.BackgroundSounds %></td>
</tr>
<tr>
<td>Beta </td>
<td> <%= Request.Browser.Beta %></td>
</tr>
<tr>
<td>Browser </td>
<td> <%= Request.Browser.Browser %></td>
</tr>
<tr>
<td>CDF </td>
<td> <%= Request.Browser.CDF %></td>
</tr>
<tr>
<td>ClrVersion </td>
<td> <%= Request.Browser.ClrVersion %></td>
</tr>
<tr>
<td>Cookies </td>
<td> <%= Request.Browser.Cookies %></td>
</tr>
<tr>
<td>Crawler </td>
<td> <%= Request.Browser.Crawler %></td>
</tr>
<tr>
<td>EcmaScriptVersion </td>
<td> <%= Request.Browser.EcmaScriptVersion %></td>
</tr>
<tr>
<td>Frames </td>
<td> <%= Request.Browser.Frames %></td>
</tr>
<tr>
<td>JavaApplets </td>
<td> <%= Request.Browser.JavaApplets %></td>
</tr>
<tr>
<td>JavaScript </td>
<td> <%= Request.Browser.JavaScript %></td>
</tr>
<tr>
<td>MajorVersion </td>
<td> <%= Request.Browser.MajorVersion %></td>
</tr>
<tr>
<td>MinorVersion </td>
<td> <%= Request.Browser.MinorVersion %></td>
</tr>
<tr>
<td>MSDomVersion </td>
<td> <%= Request.Browser.MSDomVersion %></td>
</tr>
<tr>
<td>Platform </td>
<td> <%= Request.Browser.Platform %></td>
</tr>
<tr>
<td>Tables </td>
<td> <%= Request.Browser.Tables %></td>
</tr>
<tr>
<td>Type </td>
<td> <%= Request.Browser.Type %></td>
</tr>
<tr>
<td>VBScript </td>
<td> <%= Request.Browser.VBScript %></td>
</tr>
<tr>
<td>Version </td>
<td> <%= Request.Browser.Version %></td>
</tr>
<tr>
<td>W3CDomVersion </td>
<td> <%= Request.Browser.W3CDomVersion %></td>
</tr>
<tr>
<td>Win16 </td>
<td> <%= Request.Browser.Win16 %></td>
</tr>
<tr>
<td>Win32 </td>
<td> <%= Request.Browser.Win32 %></td>
</tr>
</table>
</body>
</html>
| |
|
|
|
View highlighted Comments
User Comments on 'HTTP Browser Capabilities with ASP.NET'
|
Posted by :
Archive Import (Frank Oldale) at 13:49 on Thursday, November 14, 2002
|
This is great and easy to use but what I really need is something that tells me if there allowing cookies etc. The examples only tell you that the browser is capable of these things
Any ideas?
| |
Posted by :
Archive Import (Bill) at 07:25 on Wednesday, December 04, 2002
|
For security reasons there is no way to absolutely determine the actual user capabilities, the best you can do is guess based upon the browser capabilities with the above code.
----- siriusweblabs.com
| |
Posted by :
Archive Import (nik) at 12:08 on Thursday, January 02, 2003
|
you can try writing a cookie, then reading it again before moving on in the code.
| |
Posted by :
Archive Import (SmartWebAgent) at 03:36 on Thursday, January 16, 2003
|
This is a great illustration, but I would like to see the security questions we need to ask when using WinForms and the .net framework as well as the mobile and security questions we should ask when building ASP.NET Mobile and Compact Framework (SDE) applications. Otherwise, great intro article for those just getting started.
| |
|
|
|
To post comments you need to become a member. If you are already a member, please log in .
| |