Grabbing the Current URL,

Results 1 to 2 of 2

Thread: Grabbing the Current URL,

  1. #1
    Join Date
    Dec 1969
    Posts
    87

    Default Grabbing the Current URL,

    I was wondering how you can grab the url with ASP? If there is a solution, is it interbrowsal? I am currently making a portal and would like to give people the ability to add their favorite pages to their home page at the click of a button. Most pages are database driven by the URL so I need to capture the URL rather than the page name.<BR><BR>I would appreciate any help.<BR><BR>Brandon Monahan<BR>

  2. #2
    Join Date
    Dec 1969
    Posts
    2,849

    Default RE: Grabbing the Current URL,

    All you need to do is use a couple of Server Variables. To get the hostname, use:<BR><BR>Request.ServerVariables("HTTP_HOST")<B R><BR>and for the Script URL, use Request.ServerVariables("SCRIPT_NAME")<BR><BR>See: <BR>http://www.learnasp.com/learn/server2.asp<BR>http://www.4guysfromrolla.com/webtech/092298-3.shtml

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •