Obtaining page path when using Server.Transfer...

T

Terry Mulvany

Grettings,
Normally I can use Request.RawUrl to get the 'current' page (amongst many
other things). But in the case of using a Server.Transfer
[as in Server.Transfer(bar.aspx) from foo.aspx, my RawUrl is still showing
foo.aspx (understandably) because a 'request' is not being made per say.
But my problem is that I have a 'basepage' that needs to know the current
page, even if the page is being loaded via a server.transfer... any ideas?
Note: It's not just the page name [bar.aspx] but the path from the root of
the site [or virtual dir.]. So if foo.aspx server.transfer()ed to
http://www.domain.com/somefolder/bar.aspx I need '/somefolder/bar.aspx'.
Thanks in advance.
 
C

Chris Moore

Have you considered using a Response.Redirect() rather than a
Server.Transfer()? I don't know if that would work with your current
architecture, but it would solve the page name problem.

Chris
--------------------
 

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,999
Messages
2,570,246
Members
46,839
Latest member
MartinaBur

Latest Threads

Top