Friday, October 26, 2007

Ajax UpdatePanel (4) Triggers 2

Triggers (2):


<asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional">

<ContentTemplate>

<%= DateTime.Now %>

<asp:Button ID="Button1" runat="server" Text="Button" />

<asp:Button ID="Button2" runat="server" Text="Button" />

</ContentTemplate>

<Triggers>

<asp:AsyncPostBackTrigger ControlID="Button1" />

</Triggers>

</asp:UpdatePanel>

In this code, Button1 will update UpdatePanel1, Button2 will not update UpdatePanel1.

blog comments powered by Disqus