有一个在Ruby on Rails的所谓闪光功能,您可以把一个消息中闪光,重定向,并且消息中提供了一个动作。
There is a feature called 'flash' in ruby on rails where you can put a message in 'flash', redirect, and the message is available in the next action.
闪光灯的使用实例:
有一个控制器动作Account.ChangePassword。如果密码更改成功,会的ChangePassword填补消息密码更改成功闪光,然后重定向到Account.Profile。在Account.Profile,信息可用,因此它可以在个人资料页面显示。
There is a controller action Account.ChangePassword. If password change is successful, ChangePassword will fill flash with a message 'Password change successful', and then redirects to Account.Profile. In Account.Profile, the message is available so it can be displayed in the profile page.
有没有一些ASP.NET MVC相当于3?
Is there something equivalent in ASP.NET MVC 3?
我知道我可以使用TempData的打造这个功能像自己这,但MVC 3有内置的东西吗?
I know I can build this feature myself using tempdata like this, but does MVC 3 have something built in?
推荐答案没有,到TempData解决办法是你所期待的。什么
No, the TempData solution is what you are looking for.
更多推荐
闪存相当于ASP.NET MVC 3
发布评论