How Do I: Work with Data in ASP.NET MVC Partial Views?

by Chris Pels

In this video Chris Pels shows how to organize and pass data to partial views in an MVC application. A sample MVC application is created that contains domain models for several business entities as well as a view model that packages instances of the classes. A demo view is then created along with several partial views, all of which are strongly typed and make use of the view model class. The partial views are then added to the demo view and the instance of the view model is used to easily pass the appropriate data down to the partial views. Finally, the uses of the concepts implemented in the sample in a more extensive MVC application are discussed.

▶ Watch video (20 minutes)