![]() |
1
2
You should really only PRG after a successful post. Otherwise it's fine to return from the post if there's an error. Otherwise you need to use cookies, session or request variables to store that information for the next request. 在ASP.NET MVC2中,默认情况下,我认为tempdata使用会话状态来存储下一个请求的信息。 |
![]() |
2
0
我认为最干净的解决方案是使用这样的actionfilterattribute:
After you just have to put your attribute on the top of the action that throw the error and the action that received the error like this :
这就像一个具有清晰可管理代码的魅力。 希望这有帮助! 朱利安 |