Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

store object in session variable

Status
Not open for further replies.

dwentink

Programmer
Apr 5, 2002
11
NL
Hi
I have made an menu using ASP classes. Now I want to make an instance (object) of the menu class in one page and use this object in another page. I have done the following:

<CLASS Menu>
...
</CLASS>
<%
Dim HoofdMenu

Set HoofdMenu = new Menu

.....do some things with HoofdMenu.....

set Session(&quot;theMenu&quot;) = HoofdMenu
%>

When I use this Session variable in another ASP page, I cannot call the Menu-methods or do anything else with the object. The code I used is:

<%
Dim HoofdMenu
set HoofdMenu = Session(&quot;theMenu&quot;)
call HoofdMenu.doSomething
%>

Does someone know of a way to maintain the object through the whole application?

Thanx
Diederik
 
How about crearting the Menu object in your application onStart procedure instead.

Thanks,

Gabe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top