At the end of my ActionResult method I have
return RedirectToAction(Request.UrlReferrer.ToString());
which redirect to the previous page. Is there any way to redirect it to two or three pages back?
At the end of my ActionResult method I have
return RedirectToAction(Request.UrlReferrer.ToString());
which redirect to the previous page. Is there any way to redirect it to two or three pages back?
One way is to have a list of four Uris stored in Session
and for each request, to push away the olders and push current Uri - Request.RequestUri.
When going back just choose one of the oldest within the stored Uris.
However, you can consider using Html5 history API, as indicated here.
I think the answer you looking for can be found here.
How to use RedirectToAction to redirecto to a position in the page?
Hope it helps.