In ASP.NET MVC 3 Preview 1 , we introduced some syntactic sugar for creating and accessing view data using new dynamic properties. Sugar, it’s not just for breakfast. Within a controller action, the ViewModel property of Controller allows setting and accessing view data via property accessors that are resolved dynamically at runtime. From within a view, the View property provides the same thing ( see the addendum at the bottom of this post for why these property names do not match ). Disclaimer This blog post talks about ASP.NET MVC 3 Preview 1, which is a pre-release version. Specific technical details may change before the final release of MVC 3. This release is designed to elicit feedback on features with enough time to make meaningful changes…(read more)
Dynamic Methods in View Data
0