UpdatePanel 后台常调用的的JS语句

//UpdatePanel里面弹出对话框 

 ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "click", "alert('表单提交成功!');", true);

 

//UpdatePanel里面调用父窗口方法 

ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "window.parent.opener.doClientSearch();", true);

                
              //  this.ClientScript.RegisterStartupScript(typeof(WebBase), Guid.NewGuid().ToString(),
              //"<script language=javascript>window.parent.opener.doClientSearch();</script>");
 

//UpdatePanel关闭当前窗口

ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "", "window.opener=null;window.open('','_self');window.close();", true);
posted @ 2011-11-18 15:24  jamsewang  阅读(763)  评论(0编辑  收藏  举报