开发者

Need advice on multitab form in ASP.NET MVC

i need an advice on how to impl开发者_StackOverflow社区ement 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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜