zoukankan      html  css  js  c++  java
  • UpdateProgress属性DynamicLayout和DisplayAfter

    aspx
        <form id="form1" runat="server">
            
    <asp:ScriptManager ID="ScriptManager1" runat="server">
            
    </asp:ScriptManager>

            
    <asp:UpdateProgress ID="UpdateProgress1" runat="server" DynamicLayout="false" AssociatedUpdatePanelID="UpdatePanel1">
                
    <ProgressTemplate>
                    DynamicLayout 
    = false
                
    </ProgressTemplate>
            
    </asp:UpdateProgress>


            
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                
    <ContentTemplate>
                    
    <%= DateTime.Now %>
                    
    <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
                
    </ContentTemplate>
            
    </asp:UpdatePanel>
            
            
    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                
    <ContentTemplate>
                    
    <%= DateTime.Now %>
                    
    <asp:Button ID="Button2" runat="server" Text="Button" OnClick="Button1_Click" />
                
    </ContentTemplate>
            
    </asp:UpdatePanel>
            
            
    <asp:UpdateProgress ID="UpdateProgress2" runat="server" DynamicLayout="true" DisplayAfter="3000">
                
    <ProgressTemplate>
                    DynamicLayout 
    = true
                
    </ProgressTemplate>
            
    </asp:UpdateProgress>
            
            
            
    <hr />
        
    </form>

    cs
        protected void Page_Load(object sender, EventArgs e)
        {

        }

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

    Thread.Sleep(5000);等待5秒
    DynamicLayout,指的是UpdateProgress隐藏的时候是否占位
    DisplayAfter,指的是UpdateProgress延迟多久才显示(单位:毫秒,1秒=1000毫秒)
  • 相关阅读:
    github上Devstack的一些变动,截至8.20
    Tokyo Tyrant(TTServer)系列(二)-启动參数和配置
    云方案术语
    四大桌面云显示协议解析
    rdesktop -u qinrui -p 'Aa7788..' 192.168.3.117 -a 32 -g workarea
    IOS开发之block应用
    怎样用EA设计ER图
    使用Jsoup解析和操作HTML
    Speak a Good Word for SB
    LeetCode234_PalindromeLinkedList (推断是否为回文链表) Java题解
  • 原文地址:https://www.cnblogs.com/timy/p/1167863.html
Copyright © 2011-2022 走看看