[RESOLVED] Access the Session in a class
I have added a class to my project and can't access the Session variable. How can I get access to it?
I have a SqlDatabase class which reads my connection string from ConfigurationSettings.AppSettings("dbCon") and that works fine. I have a login page to get the userid and password to store in the Session. On every page I have to copy a function that reads the userid and password from the Session and passes it to the class. I want to avoid this by being able to access the Session from my class.
Re: Access the Session in a class
HttpContext.Current.Session.Item("userid")