ModelBinder
In a Controller Action, ModelBinder maps the incoming request data to the to the properties of the Model object that is passed as parameter to the action method.
If the input HTML element names in the View form, that user submits, match with the Model property names, then MVC would automatically map those elements' to the model properties matching with the element names and create an instance of the Model using the values/data of those elements.
In case the names of the HTML input fields name don't exactly match with the property names of the model, a custom ModelBinder class can be created and can be used to map the input fields values with the model object's properties.
Last updated
Was this helpful?