Getting the full URL

Discussion in 'ASP General' started by Nathan Sokalski, Jun 28, 2004.

  1. I need to get the full URL of the current page in ASP. When using
    Request.ServerVariables("URL") anything after the filename (such as a
    #section1 to jump to an area on the page or data submitted from a form using
    the GET method) is automatically removed. I do not know of any keys for the
    Request.ServerVariables collection that do this, but cannot find any other
    objects/properties that would be appropriate. Any help would be appreciated.
    Thank You.
    --
    Nathan Sokalski

    www.nathansokalski.com
    Nathan Sokalski, Jun 28, 2004
    #1
    1. Advertising

  2. Nathan Sokalski

    Evertjan. Guest

    Nathan Sokalski wrote on 28 jun 2004 in
    microsoft.public.inetserver.asp.general:
    > I need to get the full URL of the current page in ASP. When using
    > Request.ServerVariables("URL") anything after the filename (such as a
    >#section1 to jump to an area on the page or data submitted from a form
    >using
    > the GET method) is automatically removed. I do not know of any keys
    > for the Request.ServerVariables collection that do this, but cannot
    > find any other objects/properties that would be appropriate. Any help
    > would be appreciated. Thank You.


    response.write Request.ServerVariables("URL") & "?" & Request.querystring

    Please stop this gross crossposting.

    Foollow up only to: microsoft.public.inetserver.asp.general

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Jun 28, 2004
    #2
    1. Advertising

  3. >I need to get the full URL of the current page in ASP.

    Then why are you posting to asp.net, webcontrols, webservices, and
    components newsgroups?

    Follow-ups set ONLY to asp.general.

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)
    Aaron [SQL Server MVP], Jun 28, 2004
    #3
  4. That would work for data posted via a form using the GET method, but what
    about URLs that jump to a specific part of the page (using something like
    filename.asp#titleindex)?
    --
    Nathan Sokalski

    www.nathansokalski.com


    "Evertjan." <> wrote in message
    news:Xns9516ED7FECD25eejj99@194.109.133.29...
    > Nathan Sokalski wrote on 28 jun 2004 in
    > microsoft.public.inetserver.asp.general:
    > > I need to get the full URL of the current page in ASP. When using
    > > Request.ServerVariables("URL") anything after the filename (such as a
    > >#section1 to jump to an area on the page or data submitted from a form
    > >using
    > > the GET method) is automatically removed. I do not know of any keys
    > > for the Request.ServerVariables collection that do this, but cannot
    > > find any other objects/properties that would be appropriate. Any help
    > > would be appreciated. Thank You.

    >
    > response.write Request.ServerVariables("URL") & "?" & Request.querystring
    >
    > Please stop this gross crossposting.
    >
    > Foollow up only to: microsoft.public.inetserver.asp.general
    >
    > --
    > Evertjan.
    > The Netherlands.
    > (Please change the x'es to dots in my emailaddress)
    Nathan Sokalski, Jun 28, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nathan Sokalski

    Getting the full URL

    Nathan Sokalski, Jun 28, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    865
    Aaron [SQL Server MVP]
    Jun 28, 2004
  2. Nathan Sokalski

    Getting the full URL

    Nathan Sokalski, Jun 28, 2004, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    113
    Aaron [SQL Server MVP]
    Jun 28, 2004
  3. David Thielen

    Get full url from relative url

    David Thielen, May 25, 2006, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    180
    David Thielen
    May 26, 2006
  4. Nathan Sokalski

    Getting the full URL

    Nathan Sokalski, Jun 28, 2004, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    133
    Aaron [SQL Server MVP]
    Jun 28, 2004
  5. slugger3113

    getting full URL from relative links

    slugger3113, Apr 19, 2010, in forum: Perl Misc
    Replies:
    4
    Views:
    209
    slugger3113
    Apr 19, 2010
Loading...

Share This Page