Hi.
Why dont you keep updatepanel out side the TabContainer..
so ur code will look like..
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" Width="804px">
<cc1:TabPanel ID="tab1" runat="server" HeaderText="Committees">
</cc1:TabPanel>
<cc1:TabPanel ID="tab2" runat="server" HeaderText="Committees">
</cc1:TabPanel>
<cc1:TabContainer
</asp:UpdatePanel>
and u can keep Updateprogress any where u want...
Hope this would help
Cheers
Thanks for your suggestion. I did try this, however, doing this breaks my Triggers. I have a Trigger on a button contained in one of the TabPanels. I also would like to add another trigger to a button in the other TabPanel. For some reason, when I move the update panel outside of the tabcontrol (along with the triggers tag), I get an exception that the Control "btnSearch" can't be found.
Please let me know if you know how to address this.
Thanks Again,
Josh
Hi Josh,
Here is the working sample that we allow the TabContainer's AutoPostBack = true.
<%@. 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"></script><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate><%=DateTime.Now.ToString()%> <ajaxToolkit:TabContainer ID="TabContainer1" runat="server" AutoPostBack="true"> <ajaxToolkit:TabPanel runat="server" ID="TabPanel1"> <HeaderTemplate> TabPanel1</HeaderTemplate> <ContentTemplate> <asp:Button ID="Button1" runat="server" Text="Button" /> </ContentTemplate> </ajaxToolkit:TabPanel> <ajaxToolkit:TabPanel ID="TabPanel2" runat="server"> <HeaderTemplate> TabPanel2</HeaderTemplate> <ContentTemplate> <asp:Button ID="Button2" runat="server" Text="Button" /></ContentTemplate> </ajaxToolkit:TabPanel> </ajaxToolkit:TabContainer> </ContentTemplate> </asp:UpdatePanel> </form></body></html>
Here we don't add triggers, the Buttons will trigger the UpdatePanel automatically.
Best regards,
Jonathan
No comments:
Post a Comment