Private MyScriptingContext As ASPTypeLibrary.ScriptingContext
Private MyResponse As ASPTypeLibrary.Response
Private MyRequest As ASPTypeLibrary.Request
Private MyServer As ASPTypeLibrary.Server
Public Sub OnStartPage(PassedScriptingcontext As ScriptingContext)
    Set MyScriptingContext = PassedScriptingcontext
    Set MyResponse = MyScriptingContext.Response
    Set MyServer = MyScriptingContext.Server
End Sub
Public Sub OnEndPage()
    Set MyScriptingContext = Nothing
    Set MyRequest = Nothing
    Set MyServer = Nothing
End Sub为什么程序不调用OnStartPage方法?

解决方案 »

  1.   

    你上面的代码必须封装成一个ActiveX,然后在这个Activex实例化时才会执行OnStartPage.
    只要你安装了PWS4或者IIS4以上的WEB服务器,实例化这个封装的组件后,一定会执行OnStartPage的.
      

  2.   

    生成DLL文件,然后注册,才可以在PWS4或IIS里运行:)
      

  3.   

    test.asp
    <%
    Set o = CreateObject("emispp.empp")
    set o = nothing
    %>
    我在vb程序的OnStartPage处设置了断点,程序不中断。
    我在Class_Initialize处设置断点,程序可以中断。
      

  4.   

    应该是Set o= Server.CreateObject("emispp.empp")