codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:



Home » ASP » Article

HTTP Browser Capabilities with ASP.NET

Article by: Robin Smith (6/25/2002)
Bookmark us now! Add to Favourites
Email a friend!Tell a friend
Summary: Use the httpbrowser object to read the capabilities of the user's browser
Viewed: 23587 times Rating (10 votes): 
 3.9 out of 5
 Rate this Article  Read Comments  Post Comments



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>





CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
Rate this article:     Poor Excellent
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.
Posted by :  Archive Import (John C. Marx) at 10:35 on Wednesday, June 18, 2003
Is there any way to detect the users connection speed?


To post comments you need to become a member. If you are already a member, please log in .

 



RELATED ARTICLES
ASP FilesystemObject
by Jeff Anderson
An introduction to the Filesystemobject
ASP GetTempName
by Jeff Anderson
Use the GetTempName method to create a randomly generated temporary file on the server.
ASP OpenTextFile
by Jeff Anderson
An introduction to the OpenTextFile Method of the FileSystemObject
ASP Format Date and Time Script
by Jeff Anderson
An ASP script showing the variety of date and time formats possible using the FormatDateTime Function.
Email validation using Regular Expression
by Jeff Anderson
Using regular expression syntax is an exellent way to thoroughly validate an email. It's possible in ASP.
Add or Subtract Hours in SQL or ASP using DateAdd
by Jeff Anderson
A beginners guide to using the SQL DATEADD function to add or subtract hours. Particularly useful when setting the time displayed on the ASP page to a different time zone (eg when the server is in the US, and the site is for a UK audience).
ASP FileExists
by Jeff Anderson
An introduction to the FileExistsMethod of the FileSystemObject
The asp:radiobutton and asp:radiobuttonlist control
by David Sussman, et al
In HTML, radio buttons are used when we need to make multiple sets of choices available, but we want the user to select only one of them.
ASP CreateTextFile
by Jeff Anderson
An explanation of the CreateTextFile Method, part of the ASP FileSystemObject
Concatenate strings in sql
by Jeff Anderson
A brief introduction to concatenating strings in an sql query (using SQL server or access databases).











Recent Forum Threads
• What is subroutine?
• How to create module that count Desktop Turn on and off time?
• Re: Improve website performance with HTML5
• How to write program to read decimal value from microcontroller port?
• Simple step to learn Visual Basic
• Re: Benefit of using PHP programming
• Re: What are the java advance technologies?
• Re: There are quite a few TaylorMade Burner 2.0 Irons
• Enhance website look with java script


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2012