闪存相当于ASP.NET MVC 3

编程入门 行业动态 更新时间:2024-10-20 00:45:50
本文介绍了闪存相当于ASP.NET MVC 3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

有一个在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

本文发布于:2023-11-03 15:27:03,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1555447.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:闪存   ASP   MVC   NET

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!