记得先  using

 

 

using System.Web.UI;

 

1 public void Alert(string str_Message)
2 {
3 ClientScriptManager scriptManager =((Page)System.Web.HttpContext.Current.Handler).ClientScript;
4 scriptManager.RegisterStartupScript(typeof(string), "", "alert('" + str_Message + "');", true);
5 }
6  public void Alert(string str_Message, string redirect)
7 {
8 ClientScriptManager scriptManager =((Page)System.Web.HttpContext.Current.Handler).ClientScript;
9 scriptManager.RegisterStartupScript(typeof(string), "", "alert('" + str_Message + "');self.location='"+redirect+"'", true);
10 }
11
12  

 

相关文章:

  • 2021-06-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-31
  • 2022-02-03
猜你喜欢
  • 2021-11-26
  • 2021-12-27
相关资源
相似解决方案