zoukankan      html  css  js  c++  java
  • UpdatePanelAnimation控件

    功能:
        UpdatePanelAnimation控件用来装饰UpdatePanel更新的效果,提供对UpdatePanel更新时和更新后的特效,并允许用户定义这些特效。定义的语法与“Animation”控件类似。

    属性:
      TargetControlID:要应用特效的UpdatePanel的ID。
      OnUpdating:更新时应用的特效。
      OnUpdated:更新后应用的特效。

    代码实例:
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        
    <title>UpdatePanelAnimation</title>
    </head>
    <body>
        
    <form id="form1" runat="server">
        
    <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
        
    </ajaxToolkit:ToolkitScriptManager>
        
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        
    <ContentTemplate>
        单击按钮后,会改变时间的背景颜色
    <br />
            
    <asp:Label ID="Label1" runat="server" Text=''></asp:Label>
            
    <br />
            
    <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
            
    </ContentTemplate>
        
    </asp:UpdatePanel>
        
    <ajaxToolkit:UpdatePanelAnimationExtender ID="UpdatePanelAnimationExtender1" runat="server" 

            TargetControlID
    ="UpdatePanel1">

             
    <Animations>

                
    <OnUpdated>

                    
    <Sequence>

                        
    <Parallel duration="2" Fps="30">

                              
    <Color  StartValue="#ff3f3f" EndValue="#ffffff" Property="style" PropertyKey="backgroundColor" />

                        
    </Parallel>

                    
    </Sequence>

                
    </OnUpdated>

            
    </Animations>

    </ajaxToolkit:UpdatePanelAnimationExtender>

        
    </form>
    </body>
    </html>
    后台代码:
     protected void Page_Load(object sender, EventArgs e)
        
    {      
                
    this.Label1.Text = DateTime.Now.ToString();        
        }

        
    protected void Button1_Click(object sender, EventArgs e)
        
    {
            System.Threading.Thread.Sleep(
    3000);
        }

    运行结果:
            
    单击提交按钮后
            
  • 相关阅读:
    CCNode作为容器实现显示区域剪裁
    使用CCNode作为容器容易踩的坑
    走了很多弯路的CCScrollView
    常用es6特性归纳-(一般用这些就够了)
    WebP图片优化
    es6 Promise 异步函数调用
    网站性能优化
    dom元素分屏加载
    js顺序加载与并行加载
    移动端真机调试
  • 原文地址:https://www.cnblogs.com/abcdwxc/p/959424.html
Copyright © 2011-2022 走看看