AsyncPostBackTrigger disables buttons...
- by afsharm
I've a simple UpdatePanel and a button outside of it. I've introduced the button as an AsyncPostBackTrigger in the UpdatePanel. UpdatePanel itself works fine but the button does not. Whenever the button is clicked, its click handler does not run just like the button is not clicked at all!
Why the button is not working and how can it be fixed?
UPDATE:
here is the markup:
<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" />