Language

How Do I: Work with Model Binders in an MVC Application?

By Chris Pels|17 minutes|

In this video Chris Pels shows how to use model binders to bind form data to complex business objects in models in an MVC application. First, an MVC application is created along with a simple model for a Customer class along with a controller and view for editing the customer data. Then, the automatic model binding of MVC is demonstrated with the customer class. Next, the Bind attribute is discussed and demonstrated as a mechanism for controlling the details of the binding process to include and exclude specific properties of a complex object. Finally, the use of namespace prefixes for segmenting form data on a page is discussed.

DOWNLOADS: Code (C#)|Code (VB)|MP3|MP4|WMV

This article was originally created on December 30, 2009

Author Information

Chris Pels

Chris Pels – Chris has been instrumental in the architecture, development, and implementation of a wide variety of business systems and databases as a technology consultant since 1986. He has extensive experience in business analysis, technical specifications, database design, several programming languages including C# and VB.NET, and statistical analysis. He holds a Ph.D. from The University of Michigan and has been a speaker at Microsoft TechEd, Microsoft DevDays, VSLive, numerous events in New England