473,385 Members | 1,582 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Access to currently executing Page object

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//
Nov 19 '05 #1
2 1103
What is it that you are trying to achieve? Where are you trying to retrieve
the currently executing page instance?

Gabriel Lozano-Morán

"Chris Newby" <CA*****************@hotmail.com> wrote in message
news:uB**************@TK2MSFTNGP10.phx.gbl...
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//

Nov 19 '05 #2
Hello Chris,

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

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

--
Matt Berther
http://www.mattberther.com
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//

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: News VS.NET \( MS ILM \) | last post by:
Please see subject ( use reflection but how ? )
0
by: HaukiDog | last post by:
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...
9
by: Hasani \(remove nospam from address\) | last post by:
I have a website with 2 aspx pages Foo.aspx, and bar.aspx The content of both files is //in 1 file Hello <%=Session.ToString()%> ================
9
by: John Smith | last post by:
Hi, I have this problem. I have a page class in code behind called "WebForm1" and I have another class called "Class1". Now in Class1 I am creating ImageButton and I am adding event handler...
2
by: Stefan | last post by:
Hello, for the implementation of a http module I have to get to the currently executing page handler (to query some specific page properties via reflection). I was looking at ...
1
by: John A Grandy | last post by:
somewhere in the .net framework libs , is the following intrinsically supplied 1. class-name & method that called the currently executing code 2. for overriden methods within a...
19
by: Mark Rae | last post by:
Hi, Is it possible to have programmatic access to the Page object in Application_BeginRequest, or is it too early in the lifecycle...? E.g. to be able to change a page's MasterPage...
5
by: reycri | last post by:
Hi, I need to be able to do this: var func = new Function("var me = <selfRef>; alert(me.params);"); func.params = "This is a test parameter"; window.setTimeout(func, 500); Basically, I...
6
by: =?Utf-8?B?SmF5IFBvbmR5?= | last post by:
I am trying to access a Public property on a Master Page from a Base Page. On the content pages I have the MasterType Directive set up as follows: <%@ MasterType virtualpath="~/Master.master" %>...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.