Question

Is there any way to know the previous page a user visited (on my site of course) from server side? I know I can do it if user was redirected before with Transfer() method. Does any history exist during session?

Was it helpful?

Solution

OTHER TIPS

Is the page that you looking for inside your own site? If so, you can do this to enable different reactions for different pages. If it is outside of your site, then I would go with UrlReferrer like Trekstuff mentioned.

If Not PreviousPage Is Nothing Then
  Dim str As String = PreviousPage.AppRelativeVirtualPath
  If str = "~/(DESIRED URL)" Then
  End If
End IF
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top