I'vm been trying to get a site running using ASP.NET MVC 3 and I came across the new dynamic ViewModel. It's great to pass values quickly to the view without using "magic strings". I'm wondering if there's something similar for the TempData that keeps it's values after a RedirectToAction.
Thanks.
TempData is not dynamic in MVC 3 (as long as I can tell anyway) e.g. this syntax does not compile :
TempData.Account = "Geronimo"
because Account property/field does not exists on the type.
ViewBag Is dynamic
ViewBag.Acount = "Geronimo"
compiles.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With