Several large extensible components of ASP (i)

Source: Internet
Author: User
Tags ini
For the ASP extensions, some of you are already familiar with some are still unfamiliar very, write the intention of this article is nothing more than to think, in your ASP several large objects have been in the heart, may wish to play some of the less commonly used extensible components, I believe that the ASP programming you will have great inspiration. (This article comes from MSDN, and it's not necessary to see a friend who has a finger on it.) Also, the younger sister's patience is not good, if finished this article did not staying power this 罢笔, hope you in lambaste time to leave a point of mouth de Tak, Dochedoches. ): b
[Center] Browser capabilities component--Browser performance components [/center]
The browser performance component creates a browser type (BrowserType) object to describe the client browser capabilities to your script.
Once a browser is connected to a Web server, the browser automatically transmits a string of user agent HTTP headers (the User agent HTTP header) to the server. The header is an ASCII string that identifies the browser and its version number. The browser type (BrowserType) object compares the header to an entry in the Browsercap.ini file.
If a matching entry is found, the browser type (BrowserType) object assumes that the browser has the properties described in the Browsercap.ini file.
If the object does not find an entry in the Browsercap.ini file that matches the header, the browser type (BrowserType) object assumes that the browser has the default browser's properties. If there are no matching entries and the Browsercap.ini file does not define settings for the default browser, the browser type (BrowserType) object assigns the browser's various property values to "Unkown".
By upgrading the Browsercap.ini file, you can easily add browser properties or a description of the new browser to this component (how to upgrade the Browsercap.ini file later).
Filename
Browsercap.dll Browser Performance Components
Browsercap.ini a text file that describes the browser's properties, which must be in the same directory as the Brwosercap.dll file
Grammar
Set BrowserType = Server.CreateObject ("MSWC. BrowserType ")
Parameters
browsertype--the name of the browser type (BrowserType) object created with the Server.CreateObject statement
Registered entry
No registration required
Example
The following example shows how to use the browser performance component to get some properties of the current browser.
<% Set BC = Server.CreateObject ("MSWC.") BrowserType ")%>
<table border=1>
<tr><td>Browser</td><td> <%= bc.browser%> </td></TR>
<tr><td>Version</td><td> <%= bc.version%> </td></TR>
<tr><td>Frames</td><td>
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.