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

Global Classes

Status
Not open for further replies.

Denster

Programmer
Apr 9, 2001
198
GB
Need to store the details of a user when they login. The old way of doing this would be to create session variables but I believe this is now frowned upon. Ideally creating a global class and somehow implementing this in the global.asax file would be the answer but not sure if this can be done in asp and vb.net.
 
Perhaps frowned upon was the wrong phrase to use, but a global class containing all the information I need would be a better solution.
 
Think its sorted!. If you declare a class as Public Shared it seems to be accessible for that session.
Still doing a few tests on it but at the moment the results are positive.
 
Why don't you make a User class, and create a new instance of that class, set up it's properties, and store that user object in the session?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top