防止用户重复点击提交按钮
页面前台按钮:
<asp:Button ID="btnSumbit" runat="server" Text="提交" οnclick="btnSumbit_Click" />
在后台Page_load事件中添加
btnSumbit.Attributes.Add("onclick", "this.disabled=true;" +this.ClientScript.GetPostBackEventReference(btnSumbit, ""));
在按钮点击事件中加入:
System.Threading.Thread.Sleep(5000);//延迟5秒钟
这个五秒钟不是定值,你可以根据自己的情况而定