开发者

.NET Web Forms getting Page object from HttpContext

How is it possible to get a reference of Page from HttpContext object.

I have seen type casting like:

HttpContext.Current.Handler as Page

The above code gives the Page details. I am unable to understand how this is possible. Can you please help me understand as in when does HttpContext get the reference to the page. I understand, the HttpCont开发者_StackOverflow中文版ext object is meant to get the details of the current request. I agree my concepts are a bit shaky. Also I would be grateful if you could suggest some good articles to help me clear this maze :)

Thanks in advance Nick


Both of them implements IHttpHandler interface.

  1. http://msdn.microsoft.com/en-us/library/system.web.httpcontext.handler.aspx
  2. http://msdn.microsoft.com/en-us/library/system.web.ui.page.aspx
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜