Get Previous URL

Discussion in 'ASP .Net' started by Guest, Jun 7, 2005.

  1. Guest

    Guest Guest

    Can someone please tell me how I get the value of the previous pages URL???

    I want to write an IF statement something like this...

    IF PREVIOUS URL = "http:www.somepage.com" THEN
    ' Do something
    ELSE
    ' Do something else
    END IF

    Thanks for any advice!!!
     
    Guest, Jun 7, 2005
    #1
    1. Advertisements

  2. Guest

    Oenone Guest

    Have you tried the Request.UrlReferrer property?
     
    Oenone, Jun 7, 2005
    #2
    1. Advertisements

  3. Guest

    Shawn Guest

    Request.ServerVariables("HTTP_REFERER")

    Definition: Returns a string containing the URL of the page that referred
    the request to the current page using an <a> tag. If the page is redirected,
    HTTP_REFERER is empty

    Shawn
     
    Shawn, Jun 7, 2005
    #3
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.