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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Object/Session binding

Status
Not open for further replies.

gregmosu

Programmer
Jul 8, 2002
117
US
How do I bind an object to a session, and then retrieve it again? If this were Java, I could use...


session.setAttribute("ObjName",Object);
-and-
session.getAttribute("ObjName");


I'm using vb.net to code this app.
Thanks,
Greg
 
Hi,

Session("MySession") = YourValue

YouValue = Session("MySession")

so fo example, you may retieve the userID of your users when they loggin.

You can then set session("UserID") = UserID

and then use that in your app, eg.

Do something where UserID = Session("userID")

hth

j
 
I have an object that I instantiate in the Gloabl.asax file on the SEssion_Start event.
Then I call a method which populates some properties of that object.
I need to access these properties in my app during the session.
Now I do not want to create Session level variables, or put cookies.
Is there a way I can access the properties of this object?

Pls let me know.
Thank you.


http:\\ under construction obviously.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top