How to get the currently executing page handler?

S

Stefan

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
 
K

Karl Seguin

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!)
 
B

Brock Allen

ASP.NET 2.0 has added a CurrentHandler property tot he HttpContext to address
this issue.
 

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

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top