Click here to Skip to main content
15,895,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Friends ... Good Day

I tried to disable or hide a tab based on condition of TabContainer of Ajax control in server side. But cant get solution. PLs share with if you know ans for this problem.

I expecting the solution in Server side.
<pre lang="HTML"><ajaxToolkit:TabContainer ID="TabContainer1"  runat="server" Height="150px" Width="400px">
    <ajaxToolkit:TabPanel ID="TabPanel1"  runat="server" HeaderText="Signature and Bio">
        <ContentTemplate>
            Test
        </ContentTemplate>
    </ajaxToolkit:TabPanel>
    <ajaxToolkit:TabPanel ID="TabPanel2"  runat="server" HeaderText="Signature and Bio 2">
        <ContentTemplate>
            Test
        </ContentTemplate>
    </ajaxToolkit:TabPanel>
</ajaxToolkit:TabContainer>


C#
protected void Page_Load(object sender, EventArgs e)
{
    TabPanel2.Visible = false;
//OR
TabPanel2.Tabs[0].visible=false;
//OR
TabPanel2.Tabs[0].Enabled=false;
}


This is not working perfectly.

Any other Idea?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900