Author: cnbruce posted from: 5D powerful multimedia ASP is not limited to acceptance and interactive display, the more is the use of ActiveX components more powerful Web applications.
What is the ActiveX component? How is it working? In fact, ActiveX Server Components is a file that exists on the web server. This file contains code that performs an item or a set of tasks, and component can perform public tasks so you don't have to create code of these tasks. A very image: Use the component directly using someone else's classic function. This procedure has been packaged.
How is the specific ActiveX component generated, how to get it? It is generally obtained by the following three paths: 1. After installing the IIS server, some built-in components that come into bring, such as the Database Access database connection component. 2. Get an optional component from a third-party developer, or free or charge, such as some upload assemblies (of course, there is now no component upload). 3, if you are a web program developer, you can use Visual Basic, Java, Visual C , COBOL and other programming languages to write the ActiveX Server Component you need. This is the so-called ASP for COM (Component Object Model), COM development.
Of course, whether the third party is still developed, the system must be registered before use. However, these are later. What we need now is to understand some of the components that come with the ASP as soon as possible.
However, before using the built-in component, first detect the component support in your own machine. Quote a paragraph of online popular "Ajiang ASP Probes", save the following code as an ASP file for debugging.
1, Objcheck.asp
<% OPTION Explicit%> <% DIM filenamefilename = request.servervariables ("script_name")
DIM Objtotest (14, 4) Objtotest (0) = "mswc.adrotator" Objtotest (0, 1) = "advertising wheel" objtotest (1,0) = "mswc.contentrotator" Objtotest (1, 1) = "Content Wheel Diagram" Objtotest (2,0) = "mswc.browsertype" objtotest (2, 1) = "Browser Type Display Components" Objtotest (3, 0) = "Mswc.nextLink" Objtotest (4, 0 = "Mswc.tools" objtotest (5,0) = "mswc.status" objtotest (6,0) = "mswc.counters" Objtotest (7, 0) = "mswc.iislog" Objtotest (8, 0) = "Mswc.permissionchecker" objtotest (9, 0) = "microsoft.xmldom" objtotest (10, 0) = "iissample.contentrotator" objtotest (11,0) = "iissample.pagecounter" Objtotest (12, 0) = "scripting .Filesystemobject "objtotest (13, 0) =" adodb.connection "public isobj, Verobj, Testobj
DIM IFOR i = 0 to 13 on error resume next isobj = false verobj = "" Testobj = "" SET TESTOBJ = Server.createObject (Objtotest (i, 0)) IF isobject (Testobj) THEN ISOBJ = true verobj = testobj.version IF Verobj = "" "or isnull (Verobj) Then Verobj = Testobj.about End IF Objtotest (i, 2) = Isobj Objtotest (i, 3) = Verobjnext
sub ObjTest (strObj) on error resume next IsObj = false VerObj = "" TestObj = "" set TestObj = server.CreateObject (strObj) If IsObject (TestObj) then IsObj = True VerObj = TestObj.version if VerObj = "" or isnull (Verobj) THEN VEROBJ = Testobj.about end if End sub%>
Component name td> | Related information td> tr> <% For i = 0 to 13%> |
<% = Objtotest (i, 0) & "" & objtotest (i, 1)%> font> td > | <% if not objtotest (i, 2) Then response.write " does not support font>" Else Response.write "Support," & Left (Objtotest (i, 3), 22) END IF%> td> tr> <% next%> table> |