Dynamic equivalent of TempData
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
精彩评论