The DefaultModelBinder
works by convention, so for it to work, the form fields must adhere to the MVC naming convention.
If you do not want to use EditorForModel
to create your form, then you will have to implement your own naming convention for every field, and set ViewData.TemplateInfo.HtmlFieldPrefix
for each element. Then, you will have to create a custom ModelBinder to take the form returned, and bind to your models based on your naming convention.
Be aware that this creates some other issues in MVC3, most important of which is that the rendering of unobtrusive validation for DropDownLists and some other items may fail.
For the general case, it is best to use EditorForModel in your view, and to work using MVC's existing conventions. You can create a view which is specific for each nested model. Brad Wilson gives a good overview of the process in this article.