开发者

HTTPmodule event (with session access) after page_load has been executed?

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 开发者_C百科Execution Order? but I can only get the session in PostAcquireRequestState, which obviously comes before page_load...


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜