We are currently loading a tab control that shows 4 tabs (Tab1, Tab2, Tab3, Tab4).
When the page loads we are showing only 2 tabs on certain conidions. This is working fine.
The following is the stripped code snippet that is being used:
public partial class ShowHide : System.Web.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
ShowHideTabs(false);
}
}
private void ShowHideTabs(bool cond)
{
if(cond)
{
tabControl.Tabs[1].Visible = true;
tabControl.Tabs[2].Visible = true;
}
else
{
tabControl.Tabs[1].Visible = false;
tabControl.Tabs[2].Visible = false;
}
}
protected void Save_Click(object sender, EventArgs e)
{
ShowHideTabs(true);
}
}
In Save button click we are trying to show the 2 tabs by making a call to ShowHideTabs(true) method. Still the 2 tabs are hidden. We also have added breakpoints in the code and have seen that the code in the if condition gets executed. But we do not see the tabs being made visible.
Is there something that we are doing wrong or are we missing any code?
Comments: This ticket was filed for a pre-15.1 version of AJAX Control Toolkit. If this is still an issue in v15.1 or later, please create a new inquiry.
When the page loads we are showing only 2 tabs on certain conidions. This is working fine.
The following is the stripped code snippet that is being used:
public partial class ShowHide : System.Web.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
ShowHideTabs(false);
}
}
private void ShowHideTabs(bool cond)
{
if(cond)
{
tabControl.Tabs[1].Visible = true;
tabControl.Tabs[2].Visible = true;
}
else
{
tabControl.Tabs[1].Visible = false;
tabControl.Tabs[2].Visible = false;
}
}
protected void Save_Click(object sender, EventArgs e)
{
ShowHideTabs(true);
}
}
In Save button click we are trying to show the 2 tabs by making a call to ShowHideTabs(true) method. Still the 2 tabs are hidden. We also have added breakpoints in the code and have seen that the code in the if condition gets executed. But we do not see the tabs being made visible.
Is there something that we are doing wrong or are we missing any code?
Comments: This ticket was filed for a pre-15.1 version of AJAX Control Toolkit. If this is still an issue in v15.1 or later, please create a new inquiry.