0

Question: I'm fiddling with sessions in asp.net in a http module.

The problem:

session("whatever") = "something" 

is set on page_load

I need an event in the http-module which is executed after page_load, and in which I have access to the session in System.Web.HttpContext.Current.Session

I was looking at this HTTPModule Event Execution Order? but I can only get the session in PostAcquireRequestState, which obviously comes before page_load...

Community
  • 1
  • 1
Stefan Steiger
  • 78,642
  • 66
  • 377
  • 442

1 Answers1

2

Why not use the PostRequestHandlerExecute event? All of the Page events will happen during the handler execute phase. There's no application event that will be fired in between page events. You could of course also cast the handler to System.Web.UI.Page, and hook up to the LoadComplete event before it executes.

Menno

Menno van den Heuvel
  • 1,851
  • 13
  • 24