ASP tools that detect whether a personal home page supports components

Source: Internet
Author: User
Tags reset
Personal Homepage | site | Support component A very useful ASP code---Detect a personal home page provide a site to support components
There are many personal home pages that support ASP services, but the point of confusion is
How can I know if the site supports some very useful components for installation, such as some email
Component Jmail,cdo, or whether to detect support for RDS, whether or not to support the index server, and so on, really
Useful, yes.
All you have to do is upload the following test file to your home page and run
It can be, oh, very simple, without any additional components oh.
Detection tools:
The checkobj.asp code is as follows:
<% @ language= "VBScript"%>
<% Option Explicit%>
<%
' This is some of the components that came with IIS4 (default)
Dim Theinstalledobjects (8)
Theinstalledobjects (0) = "MSWC." AdRotator "
Theinstalledobjects (1) = "MSWC." BrowserType "
Theinstalledobjects (2) = "MSWC." Nextlink "
Theinstalledobjects (3) = "MSWC." Tools "
Theinstalledobjects (4) = "MSWC." Status "
Theinstalledobjects (5) = "MSWC." Counters "
Theinstalledobjects (6) = "Iissample.contentrotator"
Theinstalledobjects (7) = "Iissample.pagecounter"
Theinstalledobjects (8) = "MSWC." PermissionChecker "
Function isobjinstalled (strclassstring)
On Error Resume Next
isobjinstalled = False
ERR = 0
Dim Xtestobj
Set xtestobj = Server.CreateObject (strclassstring)
If 0 = Err Then isobjinstalled = True
Set xtestobj = Nothing
ERR = 0
End Function
%>
<HTML>
<HEAD>
<TITLE> tools to detect whether your ISP supports ASP components </TITLE>
</HEAD>
<BODY>
Enter the ProgID or ClassID of the component you want to test in the following input box.
If you do not enter, the default value will be used.
<form action=<%=request.servervariables ("Script_name")%> method=post>
<input type=text value= "" Name= "classname" size=40>
<input Type=submit value=submit>
<input Type=reset value=reset>
</FORM>
<%
Dim strclass
strclass = Trim (Request.Form ("classname"))
If "" <> strclass Then
Response.Write Strclass & ""
If not isobjinstalled (strclass) Then
Response.Write "<strong> not installed, this homepage provides the site does not support this component </strong>"
Else
Response.Write "installed, this homepage provides site support to use this component!"
End If
Response.Write "<P>" & VbCrLf
Else
%>
<table border=0>
<%
Dim I
For i=0 to UBound (theinstalledobjects)
Response.Write "<TR><TD>" & Theinstalledobjects (i) & "</TD><TD>"
If not isobjinstalled (theinstalledobjects (i)) Then
Response.Write "<strong> not installed, this homepage provides the site does not support this component </strong>"
Else
Response.Write "installed, this homepage provides site support to use this component!"
End If
Response.Write "</TD></TR>" & VbCrLf
Next
%>
</TABLE>
<%
End If
%>
</BODY>
</HTML>
I provide this tool is to want you to make your homepage better, to make full use of
Your personal homepage site is available for your component to make a higher level of ASP home page out.
Good luck.



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.