UpdatePanel中执行javascript方法和弹出提示框

      /// <summary>
        /// UpdatePanel中执行javascript方法
        /// 调用:regScript(UpdatePanel1,"glPksAddContHead(1);");
        /// </summary>
        /// <param name="UpdatePanel"></param>
        /// <param name="Method"></param>
        private void regScript(System.Web.UI.UpdatePanel UpdatePanel, string Method)
        {
            ScriptManager.RegisterStartupScript(UpdatePanel, this.GetType(), "", Method, true);
        }
        /// <summary>
        /// UpdatePanel中弹出提示框
        /// 调用:regTips(UpdatePanel1, "证明单位信息保存成功!");
        /// </summary>
        /// <param name="UpdatePanel"></param>
        /// <param name="Tips"></param>
        private void regTips(System.Web.UI.UpdatePanel UpdatePanel, string Tips)
        {
            ScriptManager.RegisterStartupScript(UpdatePanel, this.GetType(), "", "alert('" + Tips + "');", true);
        }

 

posted @ 2014-06-26 14:45  linyongqin  阅读(101)  评论(0编辑  收藏  举报