アコーディオンでリフレッシュしていないのUpdatePanel
-
21-09-2019 - |
質問
私は、MS AJAXのアコーディオンコントロールを使用しています。これは、罰金、通常動作しますが、私は、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()
を追加してみました。なぜこれが起こっているのように任意のアイデア?
おかげ
解決
私はそれを解決するために管理しました。同様の問題に遭遇する人のために、私は私のScriptManagerに余分なスクリプト参照を追加します:
<asp:ScriptReference Name="MicrosoftAjaxWebForms.js" Path="http://ajax.microsoft.com/ajax/beta/0911/MicrosoftAjaxWebForms.js" />
所属していません StackOverflow