Is this javascript?
You can use:
alert(location.href);
Or:
alert(document.referrer);
The first shows the current location, and the second shows (as you requested) where the user came from.
Edit: I see that you are marked as Asp.net when you use client-side coding, there is no ASP.NET, but only javascript (strictly speaking, but ASP.NET can manage the client side through AJAX / JS).
, , iframe ( ) - .