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
 
Back
Top