private void CheckTabVisible()
{
TabPanel tp = (TabPanel)this;
if (tp.AutoPostBack && tp.DeferredRender)
{
for (int i = 0; i < tp.Items.Count; i++)
{
if (tp.Items[i] is IContent)
{
if (!tp.Items[i].HasLayout() || (tp.Items[i].HasLayout() && tp.ActiveTabIndex == i))
{
((IContent)tp.Items[i]).ContentContainer.Visible = (tp.ActiveTabIndex == i);
}
}
foreach (Control control in tp.Items[i].Controls)
{
control.Visible = tp.ActiveTabIndex == i;
}
}
}
}