protected void Page_Load(객체 전송자, EventArgs e)
{
ShowLoading();
System.Threading.Thread.Sleep(10000);
ClientScript.RegisterClientScriptBlock(typeof(string), "", "<script>document.body.onload=function(){removeLoadMsg();}</script>");
}
/// <요약>
/// 显示页면정재加载中效果
///
public void ShowLoading()
{
StringBuilder s = new StringBuilder();
s.Append(" <스크립트 언어=JavaScript 유형=텍스트/javascript>n");
s.Append(" var t_id = setInterval(animate,20);n");
s.Append(" var pos=0;var dir=2;var len=0;n");
s.Append(" function animate(){n");
s.Append(" var elem = document.getElementById('progress');n");
s.Append(" if(elem != null) {n");
s.Append(" if (pos==0) len = dir;n");
s.Append(" if (len>32 || pos>79) pos = dir;n");
s.Append(" if (pos>79) len -= dir;n");
s.Append(" if (pos>79 && len==0) pos=0;n");
s.Append(" elem.style.left = pos;n");
s.Append(" elem.style.width = len;n");
s.Append(" }}n");
s.Append(" function RemoveLoadMsg() {n");
s.Append(" this.clearInterval(t_id);n");
s.Append(" var targelem = document.getElementById('loader_container');n");
s.Append(" targelem.style.display='none';n");
s.Append(" targelem.style.visibility='hidden';n");
s.Append(" }n ");
s.Append("n");
s.Append("n");
s.Append("
n");
s.Append("
n");
s.Append("
页면정재加载中...
n");
s.Append("
n");
s.Append("
n ");
//HttpContext.Current.Response.Write(s.ToString());
HttpContext.Current.Response.Write(s.ToString());
//HttpContext.Current.Response.Flush();