[thelist] ASP.NET / VB.NET URL to String

Peter Brunone (EasyListBox.com) peter at easylistbox.com
Tue Feb 28 11:05:36 CST 2006

More or less...  You could grab the following:

1) Request.ServerVariables("SERVER_NAME")

2) Request.ServerVariables("PATH_INFO")
or Request.ServerVariables("URL")

3) Request.QueryString.ToString() 
or Request.ServerVariables("QUERY_STRING")

   Further, you might be able to replace 2 and 3 with 
Request.ServerVariables("HTTP_X_REWRITE_URL "), but I'm not sure how common that is.

   One last point:  if you're not sure whether the URL is secure or not, check Request.ServerVariables("HTTPS") (value is "on" or "off").



 From: "Casey" aspnet at thecrookstons.com

Is it possible to grab the current URL and place it into a string?


More information about the thelist mailing list