代码如下:
protected void Page_Load(object sender, EventArgs e)
{
ShowLoading();
System.Threading.Thread.Sleep(10000);
ClientScript.RegisterClientScriptBlock(typeof(string), "", "");
}
///
public void ShowLoading()
{
StringBuilder s = new StringBuilder();
s.Append(" \n");
s.Append("\n");
s.Append("
\n");
s.Append("
\n "); s.Append("
\n");
s.Append("
s.Append(" \n");
s.Append("
s.Append("
页面正在加载中...
\n"); s.Append("
s.Append("
//HttpContext.Current.Response.Write(s.ToString());
HttpContext.Current.Response.Write(s.ToString());
//HttpContext.Current.Response.Flush();