473,322 Members | 1,699 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,322 software developers and data experts.

How to get the currently executing page handler?

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

HttpContext.Current.Handler

which worked ok initially, but when for example I have two pages

WebForm1.aspx and
WebForm2.aspx

and I do a

Server.Transfer("WebForm2.aspx")

in WebForm1 then the

HttpContext.Current.Handler

is still ASP.WebForm1_aspx, even though WebForm2 already processed the
request.

Is there any other, better way to get the currently executing http
handler from an http module (in asp.net 1.1)?

Thanks
-Stefan

Nov 19 '05 #1
2 2053
This is an issue Ajax.NET is having, and we've found no solution short of
passing the Page property as a parameter....certainly not ideal nor possible
in all circumstances. In other words, after a fair amount of research, I
think the answer is no.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Stefan" <Cl*********@gmail.com> wrote in message
news:11*********************@g49g2000cwa.googlegro ups.com...
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

HttpContext.Current.Handler

which worked ok initially, but when for example I have two pages

WebForm1.aspx and
WebForm2.aspx

and I do a

Server.Transfer("WebForm2.aspx")

in WebForm1 then the

HttpContext.Current.Handler

is still ASP.WebForm1_aspx, even though WebForm2 already processed the
request.

Is there any other, better way to get the currently executing http
handler from an http module (in asp.net 1.1)?

Thanks
-Stefan

Nov 19 '05 #2
ASP.NET 2.0 has added a CurrentHandler property tot he HttpContext to address
this issue.

-Brock
DevelopMentor
http://staff.develop.com/ballen
This is an issue Ajax.NET is having, and we've found no solution short
of passing the Page property as a parameter....certainly not ideal nor
possible in all circumstances. In other words, after a fair amount
of research, I think the answer is no.

Karl


Nov 19 '05 #3

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

Similar topics

0
by: VM | last post by:
How can I load an event handler manually? EG. I want to execute the method for a Mouse Click from within a procedure without actually having to click the mouse button? Thanks.
2
by: News VS.NET \( MS ILM \) | last post by:
Please see subject ( use reflection but how ? )
2
by: GG | last post by:
Is there a way to minimize my current console app? Using this code but does not work System.Diagnostics.Process currentProcess=System.Diagnostics.Process.GetCurrentProcess(); ...
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()%> ================
2
by: Chris Newby | last post by:
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//
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...
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...
4
by: damiensawyer | last post by:
Hi, I'm trying to do something in global.asax that I would have thought to be quite simple. Basically, any request at all should get sent to another page. I actually got the code below from a...
1
by: Sarvananda | last post by:
How can one get the name of the currently selected page in a tab control in VBA access 2003? Thanks in advance for kind replies..
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.