i

ASP.Net A Complete Guide

Model Binding

 The model binding allows us to map request data to the model. The model binding does the magic of automatic binding the HTML control value to the model class.

The model binder provides below benefits:

  • No need to do the extra typecasting.

  • No need to write extra code for the HTML-Model mapping.

MVC model Binder with class type

 

Model Binder with UpdateModel function

UpdateModel() function observe the all  form’s input value/HttpRequest and updates into the model class. In Update Model concept instead of passing the Model class’s object   as parameter in Action method, we will pass the Model class’s object   as parameter in UpdateModel ()