P
Paul
Hi All,
In my application, I wished to check certain things on each page
load, so rather than paste the same code in each pages constructor, I
thought it would be more logical to inherit from Page and place the
code in there. Then each webpage will inherit from my modified page
class. This works fine, but if I try and access the Session[] from the
modified page class, I get the following error:
Session state can only be used when enableSessionState is set to true,
either in a configuration file or in the Page directive. Please also
make sure that System.Web.SessionStateModule or a custom session state
module is included in the <configuration>\<system.web>\<httpModules>
section in the application configuration.
Any help in resolving this would be greatly appreciated!
Thanks.
In my application, I wished to check certain things on each page
load, so rather than paste the same code in each pages constructor, I
thought it would be more logical to inherit from Page and place the
code in there. Then each webpage will inherit from my modified page
class. This works fine, but if I try and access the Session[] from the
modified page class, I get the following error:
Session state can only be used when enableSessionState is set to true,
either in a configuration file or in the Page directive. Please also
make sure that System.Web.SessionStateModule or a custom session state
module is included in the <configuration>\<system.web>\<httpModules>
section in the application configuration.
Any help in resolving this would be greatly appreciated!
Thanks.