User1791176437 posted
I find that if I try to get access to any session variable in a class constructor, I will get this error message:
"Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive"
I have worked around this problem by restoring session state in Page_Load() event handler instead of in the class constructor.
Seem to me that the best place to restore session state for a class object is to restore its session variables in the class constructor. Therefore, I would like to find a way to fix this problem in a way that I can restore session state in the class
constructor. If this can be done, please tell me how. If this cannot be done, please also let me know and I will stick with doing this in Page_Load().
By the way, I am using Visual Studio 2003 with .NET 1.1.
Thanks in advance for any info.
Jay Chan