The content of this article is to use the ASP's ActiveX Server components (component).
First, Browser capabilities Component (browser capability component):
We know that different browsers may support different functions, such as some browsers support the framework, and some do not support it. With this component, you can check the capabilities of your browser to make your Web page compete for different browsers for different pages (such as displaying pages without frame for browsers that do not support frame). The use of this component is very simple, it should be noted that to properly use the component, you must ensure that the Browscap.ini file is the latest (in fact, each browser and its characteristics are listed in this file, you open it to see it), otherwise the result may be very far, As in the Win98 second Edition, the IE5.0 shown in the following example is Netscape. This file is typically located under the "\Winnt\System32\Inetsrv" of the Web server, and the latest version can be downloaded to http://www.asptracker.com/or http://www.cyscape.com/browscap.
Example: wuf22.asp
Note: The use of a component is similar to an object, but a component must be created before it can be used, and you do not need to create it before you use a built-in object.
<%set browscap=server.createobject ("MSWC. BrowserType ")%>
Please wait ...
| Browser type |
<%=BrowsCap.Browser%> |
| Browser version |
<%=BrowsCap.version%> |
| Support table |
<%=BrowsCap.tables%> |
| whether to support ActiveX controls |
<%=BrowsCap.activexcontrols%> |
| support Javaapplets |
%=browscap.javaapplets%> |
| supports JavaScript |
<%=BrowsCap.javascript%> |
| Whether or not to support Cookies |
<%=BrowsCap.Cookies%> |
| to support Frames |
<%=browscap.frames% > |
| operating system |
<%=BrowsCap.Platform%> |
| support VBScript |
<%= browscap.vbscript%> |
<%set browscap = nothing%>
Note: In this example we also touch the CreateObject method of the server object, Server.CreateObject is used to create an ActiveX component that has been registered on the server (note: There are other ways to create components). But don't forget to use "Set object = Nothing" to release resources in time, this should become a habit.