You can use http://msdn.microsoft.com/en-us/library/system.web.httprequest.urlreferrer.aspx to get previous user client page.
Is there a Server.Transfer() alternative to get a user's previous page?
-
12-12-2021 - |
Pergunta
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?
Solução
Outras dicas
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
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow