How can I get the full url of the page that is calling my page? I tried the
below, but it gives me my page, not the page that redirected to me.
' Dim sURL as String
'if strcomp(Request.ServerVariables ("HTTPS"), "ON", 1) = 0 then
' sURL = "https://"
'else
' sURL = "http://"
'end if
' sURL = sURL & Request.ServerVariables ("SERVER_NAME")
' sURL = sURL & Request.ServerVariables ("SCRIPT_NAME")
' if len(trim(Request.QueryString.tostring)) > 0 then
' sURL = sURL & "?" & Request.QueryString.tostring
'end if
'Response.Write(sURL)
Thanks.
Mark Rae [MVP] - 26 Jul 2007 23:17 GMT
> How can I get the full url of the page that is calling my page? I tried
> the below, but it gives me my page, not the page that redirected to me.
Request.ServerVariables("HTTP_REFERER")
However, this can't be relied upon, as some browsers are able to spoof it,
and many ISPs strip it from the Request headers...

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net