views:

37

answers:

2

I have a page with 5 buttons on top. I want the area below the buttons to contain an update panel that will display button 1's panel if they click button 1. If they click on Button 2, then I want button 2's update panel to replace the button 1 update panel. Each panel has stuff on it like check boxes and text boxes.

Is there a way to do this? Is there a more efficient way to do this?

+3  A: 

Easy, my friend.. Just have a single update panel with multiple asp:Panel or asp:PlaceHolders inside. All of these should be visible, except the one that should be displayed based on the clicked button.

If your buttons are inside the UpdatePanel - you're done. If they're outside - no problems! Add AsyncPostBackHandlers to the UpdatePanel pointing to these buttons. Even though the buttons are not in an UpdatePanel then will still generate an AJAX callback :)

Can bring in an example if you need it too!

Artiom Chilaru
+2  A: 

Use a tab container

http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/Tabs/Tabs.aspx

Raj Kaimal
I tried that but I have to have the buttons separate from the container page, and it appears that the tab container forces the buttons to be attached to the panel.
CowKingDeluxe