Triggers in updatepanel (sample)

This sample shows how to trigger a updatepanel from a control outside of it:


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

<asp:TextBox ID="txtMyNumber" runat="server"></asp:TextBox>

<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID=uPanel1>
<ProgressTemplate>
<asp:Image ID="imgAjaxLoader" runat="server" ImageUrl="~/Icon/ajax-loader.gif"/> 
</ProgressTemplate>
</asp:UpdateProgress>

</ContentTemplate>

<Triggers>
<asp:AsyncPostBackTrigger ControlID ="btnUpdateMyNumber" />
</Triggers>

</asp:UpdatePanel>

<asp:Button  runat="server" ID="btnUpdateMyNumber" Text="Set My Number"  />

Deixe um comentário

O seu endereço de email não será publicado. Campos obrigatórios marcados com *