lifetime of ASP objects

Discussion in 'ASP General' started by Elie Grouchko, May 22, 2005.

  1. Hi All

    I am on page page1.asp and I have a reference to an ASP Vbscript object.

    I need to use Server.Execute("page2.asp") and want to pass a reference to
    this object using a session variable.

    Class Dummy
    Public VarExample
    End Class
    Dim ClassRef
    Set ClassRef = New Dummy
    ClassRef .VarExample = "test"
    Set Session("ClassRef ")=ClassRef

    Dim ClassRef
    Set ClassRef = Session("ClassRef ")
    Response.Write(ClassRef .VarExample)

    I tested it and it works, and I know it also works for COM+ objects but I am
    not if is OK to do it, are there any limitations that I should be aware of ?
    Any possible problems ?


    Elie Grouchko
    Elie Grouchko, May 22, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.