zoukankan      html  css  js  c++  java
  • 用ajax打造和gmail一样的加载进度条显示!(原创)

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>

    <script runat="server">
        
    void Button1_Click(object sender, EventArgs e)
        
    {
            
    this.Label1.Text = "更新时间:" + System.DateTime.Now.ToString();
            System.Threading.Thread.Sleep(
    2000);
        }


        
    void Button2_Click(object sender, EventArgs e)
        
    {
            
    this.Label1.Text = "更新时间:" + System.DateTime.Now.ToString();
        }

    </script>

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        
    <title>UpdatePanel Trigger Sample</title>
    </head>
    <body>
        
    <form id="form1" runat="server">
            
    <div>
                
    <asp:ScriptManager ID="ScriptManager1" runat="server">
                
    </asp:ScriptManager>
            
    <asp:UpdateProgress ID="UpdateProgress1" runat="server">
                
    <ProgressTemplate>
                    
    <div style="left: 0px;  127px; position: relative; top: 0px; background-color: #ffcc33; float: right;">
                        正在处理
    </div>
                
    </ProgressTemplate>
            
    </asp:UpdateProgress>
            
    </div>
            
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                
    <ContentTemplate>
                    
    <div>
                        
    <asp:Button ID="Button1" runat="server" Text="异步回送" OnClick="Button1_Click" />&nbsp;&nbsp;
                        
    <br />
                        
    <br />
                        
    <asp:Label ID="Label1" runat="server" Text="当前时间" Font-Bold="True" Font-Size="Large"></asp:Label></div>
                
    </ContentTemplate>
                
    <Triggers>
                    
    <asp:AsyncPostBackTrigger ControlID="Button1" />
                    
    <asp:PostBackTrigger ControlID="Button2" />
                
    </Triggers>
            
    </asp:UpdatePanel>
            
    &nbsp;
        
    </form>
    </body>
    </html>
  • 相关阅读:
    ural 1028. Stars 树状数组
    hoj 1110 Simply Syntax // poj 1126 Simply Syntax
    hdu 1827 Summer Holiday // tarjan求缩点
    hoj 3005 Game Rigging 强联通分量求缩点
    hoj 2741 The Busiest Man // 强连通分支+缩点+传递闭包
    poj 2488 A Knight's Journey 回溯
    hoj 1520 The Bottom of a Graph // poj 2553 The Bottom of a Graph
    单链表的操作C语言实现(转)
    UltraEdit 提示 希望转换xxx 到DOS格式吗?
    linux 下查看服务 服务运行级别(转)
  • 原文地址:https://www.cnblogs.com/ma/p/731632.html
Copyright © 2011-2022 走看看