Dynamic tabpanel disappear when tab clicks

drype

New Member
I have 3 tabpanels inside an updatepanel which contains textfields and links etc in user control.I am trying to use a jquery to fire the click event when user clicks different tabs but when other 2 tabs which is the dynamic control tabs clicked, it just showed for a second and disappear. It seems ok to get into the code behind method but all textfields and boxes were gone by itself.I guess this is because the page is postback but I am not sure how to fix this problem.Below is the code.ascx\[code\]<asp:UpdatePanel ID="EmployeeInfoUpdatePanel" runat="server"> <ContentTemplate> <div style="display: none;"> <asp:Button ID="hideBtn" runat="server" OnClick="mainTab_Click" /> </div> <div style="padding-left:205px"> <asp:TabContainer ID="TabContainer1" runat="server" Width="955px" Height="350px" CssClass="fancy fancy-green" ActiveTabIndex="0" OnClientActiveTabChanged="ActiveTabChanged" AutoPostBack="false"> <asp:TabPanel ID="companyTab" HeaderText="Company" runat="server" ForeColor="Black"> <ContentTemplate> codes... <ContentTemplate> </asp:TabPanel> <asp:TabPanel ID="contactTab" HeaderText="Contact" runat="server"> <ContentTemplate> <asp:TabContainer ID="tabPerson" runat="server" BorderColor="White" BorderStyle="None" BorderWidth="0px" ForeColor="Black" CssClass="fancy fancy-green" Height="500px" OnActiveTabChanged="personTab_Click"> </asp:TabContainer> </ContentTemplate> </asp:TabPanel> <asp:TabPanel ID="asstMgmtTab" HeaderText="Asset Management" runat="server"> <ContentTemplate> <asp:TabContainer ID="asstTab" runat="server" BorderColor="White" BorderStyle="None" BorderWidth="0px" ForeColor="Black" CssClass="fancy fancy-green" Height="500px" OnActiveTabChanged="sysTab_Click"></asp:TabContainer> </ContentTemplate> </asp:TabPanel> </asp:TabContainer> </div> </ContentTemplate>\[/code\]Javascript\[code\]function ActiveTabChanged(sender, e) { document.getElementById('<%= hideBtn.ClientID %>').click();}\[/code\]and in my code behind, it is just calling some of the methods to display however when I click second tab or third tab, it just quickly disappeared.Is there anything that I am missing now??Let me know if you need any other info about it.Any help would be much appreciated.Thanks
 
Back
Top