0
我正在使用MS AJAX的手風琴控制。它通常工作正常,但我似乎無法讓它與UpdatePanel一起工作。我的佈局是這樣的:UpdatePanel在手風琴中不會讓人耳目一新
<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從不刷新或更新。我嘗試在每個回發事件的代碼隱藏中添加UpdatePanel1.Update()
,但沒有運氣。任何想法爲什麼發生這種情況?
謝謝