By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,052 Members | 1,201 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,052 IT Pros & Developers. It's quick & easy.

dynamic accordion inside a tabPanel

P: 6
hi, I am having a huge problem here!
the scenario is i am trying to create dynamic accordion Panes to a accordion control inside a tab panel in a content page. It works just fine in a regular webform page which does not use a master page. but if i try to add dynamic accordion panes to a accordion inside a tab panel, it stops working. but I hav tested i can use static accordion panes jsut fine.

here is my code:

//////////// tab /////////////////
<ajaxToolkit:TabPanel runat="server" ID="TabPanel1" HeaderText="Logoff">
<ajaxToolkit:Accordion ID="MyAccordion" runat="server" SelectedIndex="0"
HeaderCssClass="accordionHeader" HeaderSelectedCssClass="accordionHeaderSelected"
ContentCssClass="accordionContent" FadeTransitions="false" FramesPerSecond="40"
TransitionDuration="250" AutoSize="None" RequireOpenedPane="false" SuppressHeaderPostbacks="true">

<ajaxToolkit:AccordionPane ID="AccordionPane1" runat="server">
<Header><a href="" class="accordionLink">Log Off </a></Header>
<asp:LinkButton ID="logoff" runat="server" OnClick="logoff_Click">Log Off Admin</asp:LinkButton>&nbsp;
<ajaxToolkit:ConfirmButtonExtender ID="LogOffConfirmButton" runat="server" TargetControlID="logoff" ConfirmText="Are you sure you want to log off ?">

thisone works just fine....since the accordion pane there is static! but when i try to add it dynamically..they do not show up
protected void loglff()
AccordionPane logoffPane = new AccordionPane();
logoffPane.HeaderContainer.Controls.Add(new LiteralControl("logoff"));
LinkButton l = new LinkButton();
l.Text = "logoff";


any help wil b much appreciated...
thank you in advance!
Aug 5 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.