Can I bind multiple forms to a single model using the default model binder?

Posted by MedicineMan on Stack Overflow See other posts from Stack Overflow or by MedicineMan
Published on 2010-06-10T18:47:12Z Indexed on 2010/06/10 18:52 UTC
Read the original article Hit count: 272

Filed under:
|
|
|
|

I have a complex page with several forms on it. The page is divided into sections, and each section has a continue button on it.

The page is bound to a pageViewModel, each section addresses a different set of properties on the model.

The continue button makes an ajax call to the controller, and the model binder binds it appropriately to the appropriate sections of the model. The section is refreshed appropriately.

Finally, I would like to have a save button at the bottom of the page that takes all the forms, and binds all of the forms to the model. The model, at this point has all of the properties filled out, and can be processed accordingly.

Can I accomplish this by some ASP MVC magic?

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET