/// <summary>
        /// 防止一个请求重复提交
        /// </summary>
        public void PreventRepeatSubmit()
        {
            if (ScriptManager.GetCurrent(this.Page).IsInAsyncPostBack)
                ScriptManager.RegisterStartupScript(this, this.GetType(), "PreventRepeatSubmit", this.Page.ClientScript.GetPostBackEventReference(this.Page.Form, string.Empty), true);
            else
                Page.ClientScript.RegisterStartupScript(this.GetType(), "PreventRepeatSubmit", this.Page.ClientScript.GetPostBackEventReference(this.Page.Form, string.Empty), true);
        }

 

相关文章:

  • 2021-07-14
  • 2022-12-23
  • 2021-04-28
  • 2021-10-25
  • 2022-01-08
  • 2022-01-26
  • 2021-12-11
  • 2021-10-26
猜你喜欢
  • 2022-12-23
  • 2021-12-03
  • 2021-05-30
  • 2022-02-02
  • 2022-12-23
  • 2021-07-13
相关资源
相似解决方案