加入进度条   

C#代码
  1.   this.Page.Response.Write("<div id=’mydiv’ >");       
  2.   this.Page.Response.Write("_");       
  3.   this.Page.Response.Write("</div>");       
  4.   this.Page.Response.Write("<script>mydiv.innerText = ”;</script>");       
  5.   this.Page.Response.Write("<script language=javascript>;");       
  6.   this.Page.Response.Write("var dots = 0;var dotmax = 10;function ShowWait()");       
  7.   this.Page.Response.Write("{var output; output = ‘正在查询,请稍后’;dots++;if(dots>=dotmax)dots=1;");       
  8.   this.Page.Response.Write("for(var x = 0;x < dots;x++){output += ‘·’;}mydiv.innerText =  output;}");       
  9.   this.Page.Response.Write("function StartShowWait(){mydiv.style.visibility = ‘visible’; ");       
  10.   this.Page.Response.Write("window.setInterval(‘ShowWait()’,1000);}");       
  11.   this.Page.Response.Write("function HideWait(){mydiv.style.visibility = ‘hidden’;");       
  12.   this.Page.Response.Write("window.clearInterval();}");       
  13.   this.Page.Response.Write("StartShowWait();</script>");       
  14.   this.Page.Response.Flush();   
  15. ………   
  16.   this.Page.Response.Write("<script language=javascript>HideWait();</script>");   

加入进度框 

C#代码
  1. this.Page.Response.Write("<script language=javascript>var win;win=window.open(‘_layouts/bluetech/loading.htm’,’progress’,’toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=270,height=201,screenX=’+(screen.width-270)/2+’,screenY=’+(screen.height-201)/2+’,top=’+(screen.height-201)/2+’,left=’+(screen.width-270)/2+”);</script>");    
  2. this.Page.Response.Flush();    
  3. ………..    
  4.   
  5. this.Page.Response.Write("<script language=javascript>win.close();</script>");   

来源:http://blog.csdn.net/21aspnet/archive/2005/03/12/317866.aspx