Hi folks,
I've been trying to work out how to asynchronously update the contents
of a TabPanel using an UpdatePanel and I can't for the life of me get
it to work. I've seen a couple of examples online that declare an
UpdatePanel inside a TabPanel, but I get an error when I try and do
something like the following:
<ajax:TabContainer runat="server" ID="TabList" ActiveTabIndex="0">
<ajax:TabPanel ID="ContentTab1" HeaderText="Tab 1">
<ContentTemplate>
<asp:UpdatePanel runat="server" ID="AsyncContent1"
UpdateMode="Conditional">
<ContentTemplate>
<!-- Some content here -->
<asp:Button runat="server" ID="UpdateButton"
OnClick="UpdateButton_Click" Text="Update" />
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabContainer>
The error I get is, "TabContainer cannot have children of type
'System.Web.UI.UpdatePanel'.". Looking at the code for the
TabContainer class, I can see that the AddParsedSubObject method
throws an HttpException if the control being parsed is not a TabPanel
or a LiteralControl. Am I missing something crucial here, or is it
simply not possible to asynchronously update the contents of a
TabPanel and the examples I have seen are in fact completely wrong?
Thanks in advance for any help that you can give me!