我有一個簡單的UpdatePanel和一個按鈕外面。我已經在UpdatePanel中將該按鈕作爲AsyncPostBackTrigger引入。 UpdatePanel本身工作正常,但按鈕沒有。無論何時單擊該按鈕,它的單擊處理程序都不會運行,就像按鈕完全不點擊一樣!AsyncPostBackTrigger禁用按鈕
爲什麼按鈕不工作,它如何被修復?
UPDATE: 這裏是標記:
<asp:UpdatePanel ID="upGridView" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="grdList" SkinID="SimpleGridView" DataKeyNames="Key" runat="server"
AllowPaging="True" PageSize="15" AutoGenerateColumns="False" Caption="<%$ Resources: CommonResources, grdListCaption %>"
EmptyDataText="<%$ Resources: CommonResources, grdListEmptyDataText %>" OnRowEditing="grdList_RowEditing"
OnPageIndexChanging="grdList_PageIndexChanging" OnRowCreated="grdList_RowCreated">
<Columns>
</Columns>
</asp:GridView>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnDelete" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="btnNew" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="btnForward" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
<asp:Button ID="btnDelete" runat="server" SkinID="Button" Text="<%$ Resources: CommonResources, btnDelete %>"
OnClick="btnDelete_Click" />
<asp:Button ID="btnNew" runat="server" SkinID="Button" Text="<%$ Resources: CommonResources, btnNew %>"
OnClick="btnNew_Click" />
<asp:Button ID="btnForward" runat="server" SkinID="Button" meta:resourcekey="btnForward"
OnClick="btnForward_Click" />
任何機會,你可以發佈你的標記? – CaRDiaK 2009-11-25 09:21:06
當然,更新的問題與標記。 – 2009-11-25 09:40:36
如果我也將Button放在UpdatePanel中,它將會工作。 – 2009-11-25 10:22:17