What is correct sytnax for setting an AsyncPostBackTrigger
for an UpdatePanel
with an asp:ButtonField
from an GridView
control?
I need to set an 'AsyncPostBackTrigger' for each asp:ButtonField in my GridView
Here is my source code
<asp:UpdatePanel ID="MyUpdatePanel" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional">
<Triggers>
</Triggers>
<ContentTemplate>
<asp:GridView ID="MyGridView" runat="server" AutoGenerateColumns="false">
<Columns>
<asp:ButtonField ButtonType="Link" CommandName="Button1" SelectText="Click Me!" />
<asp:ButtonField ButtonType="Link" CommandName="Button2" SelectText="No Click Me!" />
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
Update
I need to keep the UpdateMode
and ChildrenAsTriggers
attributes set to true because the I have other button contained within the UpdatePanel
that do not refresh the UpdatePanel
control