ajax 在updatepanel中使用alert提示方法

作者:互联网

2009-12-14

Ajax教程

ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "updateScript", "alert('删除成功!')", true);

若不是在updatepanel中需要用alert提示信息,则可以使用如下代码:

this.Page.ClientScript.RegisterStartupScript(Page.GetType(), "PopWin", "", True)

此代码不能防止刷新,但是比直接写Response.Write("")的用户体验要好!弹出提示框时不会造成当前页面空白!

-

 

相关标签:

ajax 在updatepanel中使用alert提示方法