AsyncPostBackTrigger disables buttons...
Posted
by afsharm
on Stack Overflow
See other posts from Stack Overflow
or by afsharm
Published on 2009-11-25T09:12:59Z
Indexed on
2010/03/17
15:41 UTC
Read the original article
Hit count: 430
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" />
© Stack Overflow or respective owner