Ejemplo básico de un UpdatePanelAnimationExtender de Ajax

Este es un ejemplo probado de un UpdatePanelAnimationExtender de Ajax.

Cuando el UpdatePanel ha sido actualizado este ejemplo hace un fade out y luego un fade in al contenido de un tag DIV.

Te servirá de base para experimentar.

VerPostal.aspx

ASP:
  1. <asp:ScriptManager id="ScriptManager1" runat="server"> </asp:ScriptManager>
  2.   <asp:UpdatePanel id="UpdatePanel1" runat="server">
  3.     <contenttemplate>
  4.       <DIV style="BACKGROUND-COLOR: silver">
  5.         <asp:Label id="Label1" runat="server" Text="Label"> </asp:Label>
  6.         <BR />
  7.         <asp:Button id="Button1" onclick="Button1_Click" runat="server" Text="Button"> </asp:Button>
  8.         &nbsp;<BR />
  9.         <BR />
  10.         <BR />
  11.         <BR />
  12.         <BR />
  13.       </DIV>
  14.     </contenttemplate>
  15.   </asp:UpdatePanel>
  16.   <cc1:UpdatePanelAnimationExtender id="UpdatePanelAnimationExtender1" runat="server"
  17.         TargetControlID="UpdatePanel1">
  18.     <animations>
  19.       <OnUpdated>
  20.         <Sequence>
  21.           <FadeOut Duration=".2" Fps="30" />
  22.           <FadeIn Duration=".2" Fps="30" />
  23.         </Sequence>
  24.       </OnUpdated>
  25.     </animations>
  26.   </cc1:UpdatePanelAnimationExtender>

VerPostal.aspx.vb

VB.NET:
  1. Partial Class VerPostal
  2.     Inherits System.Web.UI.Page
  3.  
  4.     Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
  5.         Label1.Text = Now.ToString
  6.     End Sub
  7.  
  8. End Class

Más información:
http://ajax.asp.net/ajaxtoolkit/UpdatePanelAnimation/UpdatePanelAnimation.aspx

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.