Determining previous page

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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

Thanks
Andre
 
You could pass the page in the QueryString or keep it in a session variable.
 
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]
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top