Use ASP object instances in VB

Source: Internet
Author: User

Development steps:
1. Create a New ActiveX dll Project
2. Modify the project name
3. Modify the module name
4. Add reference: During Development under NT and 98, Microsoft Transaction Server Type Library must be referenced in the project. For Development under Windows 2000, COM + service type library must be referenced.
5. debug the code and generate the *. dll file.

Option explicit

Dim m_objresponse as response

Dim m_objrequest as request

Dim m_objserver as server

Dim m_objapplication as application

Dim m_objsession as session

Private sub class_initialize ()

Dim objcontext as objectcontext

Set objcontext = getobjectcontext ()

Set m_objresponse = objcontext ("response ")

Set m_objrequest = objcontext ("request ")

Set m_objserver = objcontext ("server ")

Set m_objapplication = objcontext ("application ")

Set m_objsession = objcontext ("session ")

End sub

Public sub asptest ()

M_objresponse.write ", use the VB environment to write ASP programs! "

End sub

6. Test ASP code in IIS

<% Set objtest = server. Createobject ("aspobject. aspclass ")
Objtest. asptest
Set objtest = nothing
%>

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.