Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the documentation for the standard ASP.NET MVC ModelBinder?

I don't seem to be able to find any authoritative, up-to-date (i.e. for 1.0 final) documentation for the capabilities of the standard model-binder in ASP.NET MVC, particularly with respect to binding complex objects involving collections (and the naming requirements this places on the HTML form)

I have found a blog post from Phil Haack (http://haacked.com/archive/2008/10/23/model-binding-to-a-list.aspx), but it has a note at the top to say it's out of date and will be updated. There was also a useful answer here: Custom Model Binder for Complex composite objects HELP but I couldn't work out how he knew that stuff.

This page: http://www.asp.net/learn/mvc/#MVC_ActionFilters is titled 'Action filters and Model Binders', but only actual contains information about filters.

Am I reduced to reading the source or buying the new 'Gang of Foreheads' book (and hoping it's better than the other Wrox books I've made the mistake of buying in the past)? Or have I missed a good reference somewhere?

like image 893
Will Dean Avatar asked Apr 26 '09 18:04

Will Dean


People also ask

What is Databinding how it can be used in ASP.NET MVC?

Model binding is a well-designed bridge between the HTTP request and the C# action methods. It makes it easy for developers to work with data on forms (views), because POST and GET is automatically transferred into a data model you specify. ASP.NET MVC uses default binders to complete this behind the scene.

What is custom model binder in MVC?

In the MVC pattern, Model binding maps the HTTP request data to the parameters of a Controllers action method. The parameter can be of a simple type like integers, strings, double etc. or they may be complex types. MVC then binds the request data to the action parameter by using the parameter name.


1 Answers

For binding complex objects involving collections, check out my answer to this question.

like image 98
Çağdaş Tekin Avatar answered Sep 29 '22 20:09

Çağdaş Tekin