Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Correct Path

Status
Not open for further replies.

M444

Programmer
Feb 24, 2004
76
0
0
US
Hi,

I use Request.Path and some string functions to retrieve the name of the current page.

ie. If the user is at the following URL:
Then “currentPage.aspx” is returned to do some processing...

This works except where I use server.transfer instead of response.redirect for efficiency purposes. When I use server.transfer it retrieves the previous page instead of the current.

Does anyone know how I can retrieve the current page without changing all the server.transfer code to response.redirect and without reloading the page?

Thanks,
Chris
 
I found the solution shortly after posting… but perhaps this will help someone else.

Request.CurrentExecutionFilePath will provide the current page even when using server.transfer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top