Search code examples
c#ajaxtabcontainer

Is it possible to hide the Tab Strip on an ajax TabContainer?


Suppose I have an ajax TabContainer with two tabs. Due to certain buisness logic, we might set one of the tabs to Visible = false.

In this scenario, is it possible to hide the TabStrip at the top, so that they don't see only one tab?


Solution

  • OK; didn't get any replies, but just wanted to summarize what I was able to do:

    For the above situation, I actually was able to move the contents of the one visible tab outside the container by reassigning its parent control, and then re-adding where it needed to go (my example is a little more complicated than usual, due to update panels being in the section of code getting moved)

    However, it does seem possible to hide the TabStrip by modifying its CSS class depending on how many tabs should be displayed. See http://www.krissteele.net/blogdetails.aspx?id=117 or http://cushen.wordpress.com/2007/10/25/how-to-styling-the-asp-net-ajax-tabcontainer-control/ for some examples of how to modify the styling.