I searched around and found some are suggesting to use following line. But this gets me current Url and not the previous page url.
Request.Headers["Referer"].ToString();
I tried to access previous url using below command but getting the error saying Http request does not contain definition for UrlReferrer
Request.UrlReferrer.ToString();
Also tried using Current like this
HttpContext.Current
but still getting the error saying http request does not contain definition for current. Also tried "System.Web.HttpContext.Current" yet receiving error. What am I missing here?