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: 18542 times Rating (5 votes): 
 3.4 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.
Creating a Dynamic Reports using ASP and Excel
by Jeff Anderson
A simple way to generate Excel reports from a database using Excel.
Concatenate strings in sql
by Jeff Anderson
A brief introduction to concatenating strings in an sql query (using SQL server or access databases).
ASP FileExists
by Jeff Anderson
An introduction to the FileExistsMethod of the FileSystemObject
Creating an SQL Trigger
by Jeff Anderson
A beginners guide to creating a Trigger in SQL Server
Create an ASP SQL Stored Procedure
by Jeff Anderson
A beginners guide to setting up a stored procedure in SQL server and calling it from an ASP page.











Recent Forum Threads
• Regular Expression Query Replace -- Twice Wrongly
• Processing MS Office documents with Java
• Re: help!
• Re: Can javascript preload swf files?
• ADODB.Recordset error (0x800A0CB3)
• Need Your Inputs About Level Editor Interface
• `section` is an unexpected token. Expecting white space. Line 1, position 137.
• Javascript rollover toggle help please!
• help monitoting cpu load on windows machine


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-2009