开发者

How to get last page visited in a controller

开发者 https://www.devze.com 2022-12-19 08:44 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号