Is it possible to retrieve the page object from HttpContext.Current?

  • Thread starter Thread starter HaukiDog
  • Start date Start date
H

HaukiDog

Hi,

Is there away to get access to the currently executing Page object
(System.Web.UI.Page) from HttpContext.Current? I am writing some
business objects and would like to have those objects get some state
information.

Thanks!
 
Hi,

HttpContext.Current.Handler returns the current IHttphandler which is
the current page. Just don't forget to cast it.
(myPage)HttpContext.Current.Handler;

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top