开发者

Force RedirectToAction to return to the calling view

开发者 https://www.devze.com 2023-01-13 08:41 出处:网络
I have several views that submit to the same controller\'s Actio开发者_开发技巧nResult and would like the RedirectToAction statement to return to the one that called it:

I have several views that submit to the same controller's Actio开发者_开发技巧nResult and would like the RedirectToAction statement to return to the one that called it:

 return RedirectToAction([view that called it], new { ID = ID });

thx


As an addition to the methods described here, as Robert Harvey suggests, I would recommend using AJAX calls to the controller. Thus you don't have to return to views at all.

0

精彩评论

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

关注公众号