views:

27

answers:

2

I've got a big ViewModel for a ContactViewModel with several addresses (default, invoice, 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?

A: 

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.

griegs
I think it sounds good - now I've to get it in code ;-) I hope I can make a little sample. The only thing which I'm not fammiliar is how to temp. save data when I'm changing the "tab".
Timur Zanagar
A: 

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.

Chuck Conway