UrlReferrer. what is it…!??!

In code you can see from which url the user came in the UrlReferrer property of the Request.. This always show the url of the last roundtrip, whether smartNavigation is switched on or off. So it will be the url of the page itself on a postback. On the first rendering of the page it will contain the intended page the user came from.

Request.UrlReferrer.AbsoluteUri.Contains(“YourpageNameToCheck.aspx”) == true

{

          // your logic for validate the user.

}

Leave a Reply