<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="upl" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <asp:UpdateProgress ID="UpdateProgress1" runat="server">
                    <ProgressTemplate>
                        <div>
                            <div>
                                数据加载中,请等待……
                            </div>
                        </div>
                    </ProgressTemplate>
                </asp:UpdateProgress>
                
                dfdfdf
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>
</body>
</html>
public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Thread.Sleep(8000);
        }
    }
}

解决方案 »

  1.   

    http://www.cnblogs.com/zengxiangzhan/archive/2009/12/23/1630332.html
      

  2.   

    <html>
    <title>页面提交时出现等待窗口示例</title>
    <head>
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    //By Dicky 2005-2-17 11:16:49
    function Window_Load(Flag)
    {
     if (Flag == 0)
     {
      document.all['Loading'].style.display = 'block';
      //show the window
     }
     else
     {
      document.all['Loading'].style.display = 'none';
      //hide the window
     }
    }
    //-->
    </SCRIPT>
    </head>
    <body leftMargin=0 topMargin=50 >
    <div id="Loading" style="position:absolute;z-index:3;top:200px;left:250px;width:250;height:60;border-width:1;border-style:ridge;background-color:green;padding-top:10px"><center><table border="0"><tr><td valign="middle"><img src="cursor.gif" border="0" WIDTH="30" HEIGHT="30"></td><td>  </td><td valign="middle"><span id=txtLoading0 style="font-size:14px;">正在初始化页面,请稍候...</span><br><span id=txtLoading1 style="font-size:14px;">Loading,please wait...</span></td></tr></table></center></div>
    <form name="form1" method="post" action="" >
    <center>页面提交时出现等待窗口示例<input name=submit type=submit value='提交'>
    </center>
    </form>
    </body>
    </html>http://www.zaoxue.com/article/tech-60961.htm
      

  3.   

    提交时 div层出来,提交完成时div继续影藏
      

  4.   

    <asp:UpdateProgress ID="UpdateProgress1" runat="server" DynamicLayout="false" DisplayAfter="500" AssociatedUpdatePanelID="UpdatePanel1" >
            <ProgressTemplate> 等待服务器响应 </ProgressTemplate>
            
            </asp:UpdateProgress> 
      

  5.   

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>无标题页</title>
         <script type="text/javascript">
         var Page;
         var postBackElement;
         function pageLoad()
         { 
          Page = Sys.WebForms.PageRequestManager.getInstance(); 
          Page.add_beginRequest(OnBeginRequest);
          Page.add_endRequest(endRequest);
         }
        function OnBeginRequest(sender, args)
        {        
         $get("IMGDIV").style.display="";
        } 
         function endRequest(sender, args)
        {
         $get("IMGDIV").style.display="none";
        } 
       </script></head>
    <body>
        <form id="form1" runat="server">
        <DIV id="IMGDIV" style="display:none;position:absolute;left: 35%;top: 25%;vertical-align:middle;border-style:inset;border-color:black;background-color:White;z-index:40;">
          <img src="loading.gif" />                    
    </DIV>    </form>
    </body>
    </html>
      

  6.   

            document.getElementById("hiddenDiv").style.display="";       
            document.getElementById("loadDiv").parentNode.removeChild(document.getElementById("loadDiv"));  
    思想就是控制div层的出来和进取
      

  7.   

    等待的这个效果 应该是 多线程结合ajax 来做的