Get referrer URL

Discussion in 'ASP .Net' started by Harley, Jul 24, 2003.

  1. Harley

    Harley Guest

    I'm having problems getting the referrer URL in a VB.NET ASP.NET page.

    A simple piece of code like this:

    if not Request.URLReferrer is nothing then
    _REFUrl = Request.URLReferrer.Host.ToString
    end if

    It is not working... Request.URLReferrer always returns nothing. The If...Then is to avoid a runtime error if you call the page directly, in that case there is no referrer and its ok for it to be blank....
    but even when I link to the page from another page the referrer is blank.. it only gets a value when the page is posted back!

    any idea? a bug? or what am I doing wrong?
    Harley, Jul 24, 2003
    #1
    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. Harley

    Re: Get referrer URL

    Harley, Jul 26, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    3,305
    Harley
    Jul 26, 2003
  2. Aaron

    html referrer spoofing

    Aaron, Jan 25, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    6,054
    Chris Jackson
    Jan 26, 2004
  3. Kevin Spencer

    Re: Url.Referrer is NULL

    Kevin Spencer, Jun 3, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    11,844
    =?Utf-8?B?bmF0WA==?=
    Jun 3, 2004
  4. =?Utf-8?B?QmVuIEZpZGdl?=

    Emulating Referrer URL?

    =?Utf-8?B?QmVuIEZpZGdl?=, Dec 14, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    643
    Ben Fidge
    Dec 15, 2005
  5. Steven
    Replies:
    4
    Views:
    64,275
    Roland
    Feb 4, 2005
Loading...

Share This Page