第一种,这种弹出不会导致页面变乱:
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);