开发者

Conditionally Display TabPanels?

Just wondering if this is possible or not:

Say I've got a TabContainer with 2 panels in there. In most situations, I'd want the user to have the ability to select which tab to view.

Now, in a handful of scenarios, one of those TabPanels will not be visible, or empty. Is it possible to开发者_运维问答 make it so that in these situations, the entire TabContainer becomes "invisible"? (i.e. the headers are not visible, and only the populated tab panel displays)

Ideally, I'd like to do this using the ajax TabContainer, but if this isn't doable; I can always fall back to using jQuery/CSS if need be.

Thanks!


It is possible and quite doable. It's straightforward if you put the contents of the tab page that you want to show/hide in the dynamic manner that you describe into a separate user control. Then all you have to do is change the parent container of this control from the tab page to the control that is hosting the tab container, while also hiding the tab container.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜