Profile
This step-by-step article describes how to create a Component Object Model (COM) component for use in Active Server Pages (ASP).
COM components for use by ASP
Create a new ActiveX DLL project in Visual Basic.
Name the project VBASPProject and name the class Vbaspclass.
Paste the following public methods into the class module:
Public Function GetString () as String
' Return the string Hello world!
GetString = "Hello world!"
End Function
From the File menu, click Build VBASPProject.dll to compile the dynamic link library (DLL).
Create a new ASP file in Notepad and paste the following code:
<%
Set obj = Server.CreateObject ("Vbaspproject.vbaspclass")
Response.Write obj. GetString
%>
Save the ASP file in a virtual directory that is a Microsoft Internet information Server (IIS) Web application.
Run the ASP page in a Web browser. "Hello world!" will be displayed Text.
Reference
The above is just a very brief example.
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