Quick Simple Question

  • Thread starter Thread starter Mark Fox
  • Start date Start date
M

Mark Fox

Hello,

Does anyone know how to access the web form's Page
object from the HttpContext object? To get to the
Response, Request, etc. it's just
HttpContext.Current.Response,
HttpContext.Current.Request, etc. How do I geta
reference to the Page object? Thanks for your help!
 
Hi Mark,

Based on my research and experience, I think it is impossible to get a
reference to certain Page object from the HttpContext, for an instance of
the HttpApplication will be created, if there is no available, to serve the
current request, and then an instance of the HttpContext class, which
encapsulates all HTTP-specific information about an individual HTTP request
will be populated. Then certain web page will be created and from the web
page we can access the instance of the HttpApplication class via the
HttpContext instance created above to get the specific info related to the
current request.

That is, the instance of the HttpContext was created before the Page object.

Does it answer your question? If you have misunderstood your concern,
please feel free to let me know.

Best regards,

Jacob Yang
Microsoft Online Partner Support
<MCSD>
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top