在UpdatePanel的手风琴不刷新 [英] UpdatePanel not refreshing in Accordion

查看:156
本文介绍了在UpdatePanel的手风琴不刷新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用MS AJAX的手风琴控制。它工作正常,正常,但我似乎无法得到它与一个UpdatePanel工作。我的布局是这样的:

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>

有当我点击的按钮出现回发,但在UpdatePanel刷新从未或更新。我试图在$ C $加入 UpdatePanel1.Update() C-后面每个回发事件,但没有运气。任何想法,为什么发生这种情况?

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?

感谢

推荐答案

我设法解决这个问题。对于那些谁碰到类似的问题,我说在我的ScriptManager一个额外的脚本引用:

I managed to solve it. For those who run into similar issues, I added an extra script reference in my ScriptManager:

<asp:ScriptReference Name="MicrosoftAjaxWebForms.js" Path="http://ajax.microsoft.com/ajax/beta/0911/MicrosoftAjaxWebForms.js" />

这篇关于在UpdatePanel的手风琴不刷新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆