Monday, March 26, 2012

Tab Control Not working Properly in Update Panel.

I am having one update panel. inside that having some ASP Controls and a Tab Control. Now whenever this Update panel tries to Update, My tab control gets disappeared. It is not displyaed on the page.

Can you elaborate on what you are trying to do eg.

UpdatePanel -> Tab Container -> Tab - Some ASP.NET controls

Also, are you doing this in the Designer in Visual Studio? ie drag and drop designing.? otherwise?


Hi mistry,

To indicate the real problem, your source code is needed.However , here is the url that has a sample shows how to use these controls (Please focus on the source code). Hope it helps.

http://forums.asp.net/p/1128124/1784927.aspx#1784927

If your problem is still exist, please let me know.


Hi,

I tried what you described, it worked fine. Here is my code:

<%@. Page Language="C#" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server"> protected void Page_Load(object sender, EventArgs e) { Label1.Text = DateTime.Now.ToString(); }</script><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> </div> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <ajaxToolkit:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="1"> <ajaxToolkit:TabPanel ID="TabPanel1" runat="server" HeaderText="TabPanel1"> <ContentTemplate> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox> </ContentTemplate> </ajaxToolkit:TabPanel> <ajaxToolkit:TabPanel ID="TabPanel2" runat="server" HeaderText="TabPanel2"> <ContentTemplate> <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> </ContentTemplate> </ajaxToolkit:TabPanel> </ajaxToolkit:TabContainer> <asp:Button ID="Button1" runat="server" Text="Button" /> </ContentTemplate> </asp:UpdatePanel> </form></body></html>
You may compare it with your code to find out the reason.

No comments:

Post a Comment