CHAPTER 22

Image

Model Binding

Model binding is the process of creating .NET objects using the data sent by the browser in an HTTP request. We have been relying on the model binding process each time we have defined an action method that takes a parameter—the parameter objects are created by model binding. In this chapter, we’ll show you how the model binding system works and demonstrate the techniques required to customize it for advanced use.

Preparing the Example Project

For this chapter, we have created a new Visual Studio MVC project called MvcModels using the Basic template option. We will be using the same model class that you have seen in previous ...

Get Pro ASP.NET MVC 4, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.