How to get the last page visited in the controller

Is there a way to get or save the last page visited? Example, if I'm on a list page with a new link that loads a page with a form. If the user cancels, you will return to the previous page (List page).

thank

+3
source share
1 answer

Well, in web forms you should use: Request.UrlReferrer

http://msdn.microsoft.com/en-us/library/system.web.httprequest.urlreferrer.aspx

Therefore, I assume that you can also use this in MVC, accessible through the HttpContext RequestContext property, available by the controller.

+3
source

Source: https://habr.com/ru/post/1730948/


All Articles