Access to currently executing Page object

  • Thread starter Thread starter Chris Newby
  • Start date Start date
C

Chris Newby

Is there a static context property that will give access to the currently
executing System.Web.UI.Page instance? ... doesn't seem like there would be,
but thought i'd ask.

TIA//
 
What is it that you are trying to achieve? Where are you trying to retrieve
the currently executing page instance?

Gabriel Lozano-Morán
 
Hello Chris,

[C#]
Page page = HttpContext.Current.Handler as Page;

page will be null if the current IHttpHandler is not a Page
 
Back
Top