lifetime of ASP objects

E

Elie Grouchko

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.


Page1.asp
<%
Class Dummy
Public VarExample
End Class
Dim ClassRef
Set ClassRef = New Dummy
ClassRef .VarExample = "test"
Set Session("ClassRef ")=ClassRef
Server.Execute("Page2.asp")
%>


Page2.asp
<%
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 ?

Thanks

Elie Grouchko
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top