两种弹出提示框的方式

来源:互联网 发布:dicom数据 编辑:程序博客网 时间:2024/05/17 08:03

第一种,这种弹出不会导致页面变乱:

  Page.ClientScript.RegisterStartupScript(this.GetType(), "Cscript", "<script for=window event=onload>window.alert('请检查数据后重新提交!');</script>");

 

第二种是在UpdatePanel中弹出提示框:


            ScriptManager.RegisterClientScriptBlock(UpdatePanel1, this.GetType(), "click", "alert('添加成功');this.location='Img.aspx?v=2';", true);

原创粉丝点击