两种ajax环境页面下的alert方式

指定UpdatePanel中的某个控件,注册一个启动脚本块,并将该脚本块添加到页面中:

ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "提示", "alert('购物车为空,请先购物!')", true);  

为每个异步回发向ScriptManager控件注册一个启动脚本块,并将该脚本块添加到页面中:

 ScriptManager.RegisterStartupScript(this.Page, typeof(Default6),"show","alert('Ok')",true);

相关文章:

  • 2021-07-25
  • 2021-11-03
  • 2021-06-12
  • 2022-12-23
  • 2021-07-25
  • 2021-11-30
  • 2021-09-15
猜你喜欢
  • 2022-02-27
  • 2022-12-23
  • 2021-09-24
  • 2022-12-23
相关资源
相似解决方案