views:

28

answers:

1

Hi all. Most of the resources on the Internet seems to discuss how to do url rewriting in asp.net. None of them seem to discuss about how to read the rewritten url.

For example, I have rewritten:

http://www.test.com/users.aspx?id=12&name=sangam

to

http://www.test.com/profile/12/sangam.aspx

Now in the same page, at some point, I want to get this rewrittern url for the purpose of pointing return url in login link. Now a login link should be:

http://www.test.com/login.aspx?ReturnUrl=/profile/12/sangam.aspx

What is the proper way to achieve this? Thanks.

+3  A: 

Try Request.RawUrl

JonoW
Thank you JonoW. It worked.
sangam