P
Pinku
Hi Guys,
I'm going crazy with a problem.
I have a web application that do something in
Application_PreRequestHandlerExecute, in this Method I use Session and
I have no problem about it.
I start having problem If I try to dinamically load a web user control
and add it to a controls collection of another webcontrol, for
example:
If I try to do this in Default.ASPX Page_Load:
myDiv.Controls.Add(Page.LoadControl("mycontrol.ascx"));
I obtain this exeption : "Session State not available in this context"
and debugger higlight the row in Application_PreRequestHandlerExecute
when i try to use the session.
Why this????
Until I don't load control I can access session in
Application_PreRequestHandlerExecute.
Regards
Diego
I'm going crazy with a problem.
I have a web application that do something in
Application_PreRequestHandlerExecute, in this Method I use Session and
I have no problem about it.
I start having problem If I try to dinamically load a web user control
and add it to a controls collection of another webcontrol, for
example:
If I try to do this in Default.ASPX Page_Load:
myDiv.Controls.Add(Page.LoadControl("mycontrol.ascx"));
I obtain this exeption : "Session State not available in this context"
and debugger higlight the row in Application_PreRequestHandlerExecute
when i try to use the session.
Why this????
Until I don't load control I can access session in
Application_PreRequestHandlerExecute.
Regards
Diego