how to get the previous to previous page name in asp.net
how to get second previous page name in asp.net
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Amit Kumar SinghPosted Mar 15, 2016, 2:06 AM
protectedvoidPage_Load(objectsender, EventArgs e){if(Request.UrlReferrer !=null){stringpreviousPageUrl = Request.UrlReferrer.AbsoluteUri;stringpreviousPageName = System.IO.Path.GetFileName(Request.UrlReferrer.AbsolutePath);}}Amit Kumar SinghPosted Mar 15, 2016, 2:05 AM
1.You have to store somewhere URL of page you want to recall, for example using ViewState in Page_Load() method:
2.Retrieve url from ViewState:
3.Get name of page with this url:
Amit KumarPosted Mar 15, 2016, 2:01 AM