论坛首页 编程语言技术论坛

asp.net后台弹消息框

浏览 2290 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2011-10-20  
ScriptManager.RegisterStartupScript(Label1, this.GetType(), "", "alert('确定!');", true);
Page.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('确定!!');", true);
          return;
用上面两种方法,来解决后台弹出消息框的问题,但是当进入另一个页面,再返回时,消息框再次弹出来了,本页面有Requst参数传递,解决方法:

可试试刷新:
Response.Write("<script language=‘javascript’>window.location.href=window.location.href;</script>");
论坛首页 编程语言技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics