Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1139
  • Last Modified:

ASP.NET find out which page redirected to current page

Hello experts,
in my asp.net app I redirect from some pages to others. How do I find out from which page my current page was called?
I though it should be the sender of the page_load method. But there I always get the current page as the sender.

Can someone help me?
0
arthrex
Asked:
arthrex
  • 2
2 Solutions
 
bmatumburaCommented:
Try:
referrer = Request.ServerVariables("http_referrer") 

Open in new window

0
 
bmatumburaCommented:
Also:
Dim strReferrer As String
If (Request.UrlReferrer Is Nothing) Then
  ' it's a bookmark
Else
  strReferrer = Request.UrlReferrer.ToString
End If

Open in new window

0
 
arthrexAuthor Commented:
perfect
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now