简体   繁体   中英

Visibility of ajaxToolkit:TabContainer using css

I use ajaxToolkit:TabContainer to organize page contents. Some times, I need to hide some tabs based on conditions. The problem is, I would like to read the content of hidden tab using JavaScript. So I can not use C#'s Tab.Visible = false because it will not render the tab.

When I use CSS's display:none; or visibility:hidden; , the tab still there (without tab titles). I guess Ajax tab does not support the css properties. What are the alternatives should I use ?

You can use TabContainer1.Tabs[0].Enabled = false; to hide tab, it will still generate the DOM element for this tab and you can access it using javascript.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM