RSLV-Not able to access Application & Session variables in standard modules & classes
Hi everybody,
In my web project, I have initialized an application variable in Application_Start event in Global.asax and initialized a session variable in Default.aspx (startup page). I want to access these variables in procedures and functions in my standard modules and also in my classes, which I am not able to do. Why are they not accessible in standard modules and classes? Is there any way I could do that?
Re: Not able to access Application & Session variables in standard modules & classes
I beileve its because the Page "Context" is not accessible through classes and so the session is not available.
Re: Not able to access Application & Session variables in standard modules & classes
I found the solution in another forum. They can be accessed by prefixing the variables with System.Web.HttpContext.Current.