何时在MVC 3应用程序中使用ViewBag,ViewData或TempData [英] When to use ViewBag, ViewData, or TempData in MVC 3 applications

查看:80
本文介绍了何时在MVC 3应用程序中使用ViewBag,ViewData或TempData的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

何时在MVC 3应用程序中使用ViewBag,ViewData或TempData

When to use ViewBag, ViewData, or TempData in MVC 3 applications

推荐答案

我在网上搜索时找到了答案

请参阅此网站
http://rachelappel.com/when-封装MVC时,在asp.net-mvc-3-应用程序中使用viewbag-viewdata-或-tempdata-
I find the answer while search on the net

refer to this site
http://rachelappel.com/when-to-use-viewbag-viewdata-or-tempdata-in-asp.net-mvc-3-applications


ViewBag,ViewData或TempData非常有用应用程序.

看这些链接

何时使用

https ://lchandara.wordpress.com/2011/08/12/when-to-use-viewbag-viewdata-or-tempdata-in-asp-net-mvc-3-applications/ [ ^ ]


http://rachelappel.com/when- to-use-viewbag-viewdata-or-tempdata-in-asp.net-mvc-3-applications [ http://mvcdecoder.wordpress.com/2011 /12/17/why-not-to-use-viewdata-viewbag-or-tempdata/ [ http://kazimanzurrashid.com/posts/viewdata-or-viewbag-avoid-dependency-pollution-in-asp-dot-net-mvc-controller [
ViewBag, ViewData, or TempData are very useful while doveloping MVC application.

look these links

When to use

https://lchandara.wordpress.com/2011/08/12/when-to-use-viewbag-viewdata-or-tempdata-in-asp-net-mvc-3-applications/[^]


http://rachelappel.com/when-to-use-viewbag-viewdata-or-tempdata-in-asp.net-mvc-3-applications[^]

and also you should know, why not to use in some situations

http://mvcdecoder.wordpress.com/2011/12/17/why-not-to-use-viewdata-viewbag-or-tempdata/[^]

http://kazimanzurrashid.com/posts/viewdata-or-viewbag-avoid-dependency-pollution-in-asp-dot-net-mvc-controller[^]

Thanks

SP


这篇关于何时在MVC 3应用程序中使用ViewBag,ViewData或TempData的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆