Reputation: 628
i need an advice on how to implement my form.
I have a requirement: i need a form that spans through 5 tabs. Each tab has around 10 fields, some of them empty, some of them must contain data from db and be non editable.
Each of these tabs must be a part of one form that is submitted to my controller.
The question is: what is the best way to implement this?
I was thinking about having partial views on each tab, each view would have its own model class. After form gets filled all data from all partials would go to action that will take care of all of it.
Any advices?
I am using ASP.NET MVC 1, Entity Framework 1, mvc extensions from Telerik and jQuery
Upvotes: 2
Views: 1205
Reputation: 24754
IMHO the easy way to do this is to have one single form split up into tabs via <div>
's. Then use one of the bazillion jquery/javascript tabbing libraries to switch between them.
Validation and UI flow control will be so much simpler. A single form, single POST action method,single place for validation errors. Splitting up this problem with partials and multiple views just makes things harder.
Upvotes: 1