开发者

How to build a tabbed Edit View for a big ViewModel in ASP.NET without JavaScript?

I've got a big ViewModel for a ContactViewModel with several addresses (default, invoic开发者_运维百科e, delivery). This ContactViewModel I would like to edit within a DefaultAddress tab, etc. and I would like to know how to handle this without JavaScript? Is this possible?


Tell me if I'm off base here;

The way i think i'd approach this is to create a partial view which takes a list. the partial view would itterate through the list and create another partial view which is the tab.

on click of the tab i'd do a postback and store the clicked tab. this id then becomes the active tab.

when i come back to rebuild my page, the partialview for the actual tab would need to check to see if it's active and then make itself visible. if not visible then simply render nothing maybe.


This can be done with CSS. Here is an example: http://www.alistapart.com/articles/slidingdoors/

The selected tab/view will need to be rendered on the server. I can see each tab being a link, when the link is clicked the correct view and selected tab is returned.

Some of the css tabs don't work correctly in IE6. I'm not sure if the above link is one of them.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜