Results 1 to 2 of 2

Thread: microsofts active server pages object library

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 1999
    Location
    Atlanta
    Posts
    145

    microsofts active server pages object library

    Does anyone know where to get code samples or information about using "microsofts active server pages object library" in a Visual Basic 6.0 application.
    I want to use the response.redirect within a DLL.
    TIA

  2. #2
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    This goes in a class module. Basically you create an instance of this class in ASP via Server.CreateObject and call its functions. You can get at the ASP Objects in the class's functions by the passed in references (MyResponse.Redirect).

    VB Code:
    1. Option Explicit
    2.  
    3. Private MyScriptingContext As ScriptingContext
    4. Private MyApplication As Application
    5. Private MyRequest As Request
    6. Private MyResponse As Response
    7. Private MyServer As Server
    8. Private MySession As Session
    9.  
    10. Public Sub OnStartPage(PassedScriptingContext As ScriptingContext)
    11.     'get references to the ASP built in objects
    12.     Set MyScriptingContext = PassedScriptingContext
    13.     Set MyApplication = MyScriptingContext.Application
    14.     Set MyRequest = MyScriptingContext.Request
    15.     Set MyResponse = MyScriptingContext.Response
    16.     Set MyServer = MyScriptingContext.Server
    17.     Set MySession = MyScriptingContext.Session
    18. End Sub
    19.  
    20. Public Sub OnEndPage()
    21.     'release the references
    22.     Set MyScriptingContext = Nothing
    23.     Set MyApplication = Nothing
    24.     Set MyRequest = Nothing
    25.     Set MyResponse = Nothing
    26.     Set MyServer = Nothing
    27.     Set MySession = Nothing
    28. End Sub
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width