Access to currently executing Page object

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//
 
G

Gabriel Lozano-Morán

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

Gabriel Lozano-Morán
 
M

Matt Berther

Hello Chris,

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

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

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top