UpdatePanel not refreshing in Accordion

Posted by TenaciousImpy on Stack Overflow See other posts from Stack Overflow or by TenaciousImpy
Published on 2010-03-23T21:17:07Z Indexed on 2010/03/23 21:53 UTC
Read the original article Hit count: 459

Hi, I'm using MS AJAX's accordion control. It works fine normally, but I can't seem to get it to work with an UpdatePanel. My layout is like this:

    <div id="accordion">
     <div><a href="#">Header1</a></div>

        <div class="acc_content">  
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"  >

    <ContentTemplate>
    <asp:button id="btnToggle" runat="server" text="toggle"/>

  //my repeater contents go here. The buttons within the repeater cause a postback, but changes cannot be seen unless the page is manually refreshed (since the updatepanel doesn't refresh)
    </ContentTemplate>

    <Triggers>
    <asp:AsyncPostBackTrigger ControlID="btnToggle" EventName="click" />
    <asp:AsyncPostBackTrigger ControlID="btnAdd" EventName="click" /> //this button is outside the updatepanel


    </ContentTemplate>
    </Triggers>
    </asp:UpdatePanel>
    </div>

    <div><a href="#">Header 2 </a></div>
      <div class="acc_content">  
          Content of the second pane
          </div>



    </div>

There are postbacks occurring when I click the buttons, but the updatepanel never refreshes or updated. I tried adding UpdatePanel1.Update() in the code-behind for each postback event, but no luck. Any ideas as to why this is happening?

Thanks

© Stack Overflow or respective owner

Related posts about accordion

Related posts about msajax