How to create session object

Joined
Oct 1, 2008
Messages
2
Programming Experience
3-5
Hi,

It would be great if someone could give me a little push start in creating a session object for my application that holds user ID and Security info. Basically i need a session object class with properties to hold the values of user ID and some extra security info.

Could U point me in the right direction?

Thanks.
Paul
 

ss7thirty

Well-known member
Joined
Jun 14, 2005
Messages
455
Location
New Jersey, US
Programming Experience
5-10
Well if you are in ASP.NET just say Session("AnyObjectName") and you can store things in there. However, you can just create a similar object for your own use if you are in winforms. What exactly are you looking to store there is an object for pretty much everything that you can call Session and just store all the info. The big depends here is whether or not it is ASP or winforms. But ASP has a session built into it for random storage and access throughout a session. Winforms you can create global objects that act like a session variable in ASP.
 

ss7thirty

Well-known member
Joined
Jun 14, 2005
Messages
455
Location
New Jersey, US
Programming Experience
5-10
Not really sure what you mean by passing properties to classes.

I have worked on web application where I stored user information in the session. You can say Session("UserID") = userid and then reference the value later. If it is null later on the session has timed out and things like that. I am not sure if there are any strict security requirements that you may have and how the Session is with that kind of stuff but I think that is exactly what the session object is for, amongst other things.
 
Top Bottom