在加载时添加下面两条语句
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
#region 遮罩按钮
this.Download.Attributes.Add(" onclick ", ClientScript.GetPostBackEventReference
(Download, " Click ") + " ;this.disabled=true; this.value=‘同步中…’; “);
this.btnImport.Attributes.Add(” onclick ", ClientScript.GetPostBackEventReference
(btnImport, " Click ") + " ;this.disabled=true; this.value=‘上传中…’; ");
#endregion
}
}
防止前端重复提交表单
最新推荐文章于 2024-09-01 07:00:00 发布