[thelist] Re: Getting the URL from the location bar in ASP?
HUTTON III, WILLIAM J.
WJHUTTONIII at energy-northwest.com
Mon Mar 31 11:57:38 CST 2003
: I had a few lines of ASP that would get the URL from the browsers location
: bar, and store it as a string, but unfortunately I've lost it... and cant
: remember how it was done.
<%
DIM strURL
strURL = "http://" & Request.ServerVariable("SERVER_NAME") &
Request.ServerVariable("SCRIPT_NAME")
%>
That might not be the best way to do it, but I thought the ServerVariables
collection had the URL of the current page. I can't seem to find it in
there though. The above code sets strURL to
"http://localhost/devel/servervariables.asp", which is a page I wrote to
dump the contents of the ServerVariables collection.
If it's not exactly what you need, maybe it will get you pointed in the
right direction.
Will
More information about the thelist
mailing list