开发者

Dynamic equivalent of TempData

开发者 https://www.devze.com 2023-03-07 08:33 出处:网络
Microsoft introduced ViewBag in MVC3 which is the dynamic version of ViewData. Similarly is 开发者_开发技巧there a dynamic version of TempData?No, there is no such dynamic version. But you could proba

Microsoft introduced ViewBag in MVC3 which is the dynamic version of ViewData. Similarly is 开发者_开发技巧there a dynamic version of TempData?


No, there is no such dynamic version. But you could probably easily write an extension method that wraps the TempDataDictionary as a dynamic.


Negative ghost rider but avoid the dynamic stuff if possible and use viewmodels as it is strongly typed and easier to follow

0

精彩评论

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

关注公众号