This is a migrated thread and some comments may be shown as answers.

Posting a form best practice

1 Answer 112 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Felipe Casanova
Top achievements
Rank 1
Felipe Casanova asked on 28 Apr 2012, 10:43 PM
What would be the recommended option from the following? A MVC form contains a number of grids some with checkboxes and some with the standard input elements. All of these form components should be validated together and submitted back to the server in one go. Would templates for the grids be possible and best? With templates I can specify the input element names such that collections are populated automatically by the MVC binder for my action method parameter object e.g. <input name="myobjectscollection" type="checkbox"/> Or would converting the entire form to json and sending that be the best way to go? I suspect there is not much difference if both are possible but I want to check if I've missed something.

1 Answer, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 03 May 2012, 08:44 AM
Hello Matt,

Both approaches should work, and you can choose the one that is more convenient for you. It is likely that using the model binder will be more efficient, since you won't have to parse the JSON on the server, but this depends entirely on your specific use-case.

Regards,
Alex Gyoshev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Data Source
Asked by
Felipe Casanova
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Share this question
or