Solved

ASP.NET find out which page redirected to current page

Posted on 2009-04-02
3
1,090 Views
Last Modified: 2012-05-06
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
Comment
Question by:arthrex
  • 2
3 Comments
 
LVL 11

Assisted Solution

by:bmatumbura
bmatumbura earned 500 total points
ID: 24047687
Try:
referrer = Request.ServerVariables("http_referrer") 

Open in new window

0
 
LVL 11

Accepted Solution

by:
bmatumbura earned 500 total points
ID: 24047696
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
 

Author Closing Comment

by:arthrex
ID: 31565695
perfect
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

AJAX ModalPopupExtender has a required property "TargetControlID" which may seem to be very confusing to new users. It means the server control that will be extended by the ModalPopup, for instance, if when you click a button, a ModalPopup displays,…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
This video discusses moving either the default database or any database to a new volume.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now