Thursday, October 25, 2007

Ajax UpdatePanel (1) UpdateMode

UpdateMode:

<form id="form1" runat="server">

<asp:ScriptManager ID="ScriptManager1" runat="server">

</asp:ScriptManager>

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

<ContentTemplate>

<%= DateTime.Now %>

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

</ContentTemplate>

</asp:UpdatePanel>

<hr />

<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">

<ContentTemplate>

<%= DateTime.Now %>

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

</ContentTemplate>

</asp:UpdatePanel>

</form>

In this code, Button1 will only update UpdatePanel1, Button2 will only update UpdatePanel2.

blog comments powered by Disqus