Forum Moderators: open

Message Too Old, No Replies

Get address bar page name

         

onetry

10:15 am on Apr 5, 2007 (gmt 0)

10+ Year Member



I'm using urlrewriting in asp net solution.

So about-us.html ---> index.asp?something

I would like to get via asp-net script "about-us.html" but trying to do:

request.servervariables("SCRIPT_NAME") I obtain index.asp.

Please tell me that I can obtain that value server-side...

Any help appreciated.

seizer

10:21 pm on Apr 10, 2007 (gmt 0)

10+ Year Member



In ASP.NET, you can read Request.RawUrl which will contain the URL that the user typed.

sgietz

2:51 pm on Apr 11, 2007 (gmt 0)

10+ Year Member



Request.Url gives you the URL as it appears in the address bar.

Request.RawUrl gets the relative path.

onetry

7:41 am on Apr 16, 2007 (gmt 0)

10+ Year Member



@seizer @sgietz Thx :-)