How to get last page visited in a controller
is there a way to get or store the last page visite开发者_如何学Pythond? Example if I'm on a List Page with a New link that loads a page with form. If the user cancels, you go back to the previous page (List Page).
Thanks
Well, in web forms, you would use: Request.UrlReferrer
http://msdn.microsoft.com/en-us/library/system.web.httprequest.urlreferrer.aspx
So I assume you can also use that in MVC, accessible through the HttpContext property of the RequestContext acessible by teh controller.
精彩评论