Obtaining page path when using Server.Transfer...

  • Thread starter Thread starter Terry Mulvany
  • Start date Start date
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.
 
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
--------------------
 
Back
Top