Determining previous page

Discussion in 'ASP .Net' started by =?Utf-8?B?TmV3YmllIHF1ZXN0aW9u?=, Jun 3, 2004.

  1. How can you determine (in server code) the name/address of the page before the current page

    Thanks
    Andre
    =?Utf-8?B?TmV3YmllIHF1ZXN0aW9u?=, Jun 3, 2004
    #1
    1. Advertising

  2. You could pass the page in the QueryString or keep it in a session variable.

    "Newbie question" <> wrote in message
    news:...
    > How can you determine (in server code) the name/address of the page before

    the current page?
    >
    > Thanks,
    > Andre
    VB Programmer, Jun 3, 2004
    #2
    1. Advertising

  3. Hi Andre,

    Try this?

    Private Sub Page_Load _
    (ByVal sender As System.Object, _
    ByVal e As System.EventArgs) _
    Handles MyBase.Load
    Dim MyUrl As Uri = Request.UrlReferrer
    If Not IsNothing(MyUrl) Then
    Response.Write("Referrer URL name: " & _
    MyUrl.AbsoluteUri & "<br>")
    Response.Write("Referrer URL Port: " & _
    MyUrl.Port & "<br>")
    Response.Write("Referrer URL Protocol: " & _
    MyUrl.Scheme & "<br>")
    End If
    End Sub

    Ken
    Microsoft MVP [ASP.NET]

    "Newbie question" <> wrote in message
    news:...
    > How can you determine (in server code) the name/address of the page before
    > the current page?
    >
    > Thanks,
    > Andre
    Ken Cox [Microsoft MVP], Jun 3, 2004
    #3
    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. Greg Krzeszkowski
    Replies:
    3
    Views:
    583
    Peter Blum
    Mar 3, 2005
  2. ABC
    Replies:
    2
    Views:
    435
    John Timney \( MVP \)
    Jan 14, 2006
  3. ABC
    Replies:
    2
    Views:
    415
    libero familymac news
    Jan 14, 2006
  4. bill
    Replies:
    6
    Views:
    9,090
  5. =?Utf-8?B?dGhlV2l6YXJkMQ==?=

    Cross Page Posting using public property on previous page

    =?Utf-8?B?dGhlV2l6YXJkMQ==?=, Apr 20, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    698
    Swanand Mokashi
    Apr 20, 2006
Loading...

Share This Page