防止按鈕重覆點擊
<asp:Button ID="btSubmit" runat="server" UseSubmitBehavior="false" />
C#
btSubmit.Attributes.Add("onclick", " this.disabled = true; " + ClientScript.GetPostBackEventReference(btSubmit, null) + ";");
VB.Net
btSubmit.Attributes.Add("onclick", " this.disabled = true; " + ClientScript.GetPostBackEventReference(btSubmit, Nothing) + ";")
參考資料:
http://www.dotblogs.com.tw/joysdw12/archive/2011/11/22/58961.aspx
http://www.dotnetvishal.com/2013/01/disable-button-double-click-in-aspnet.html
http://www.dotblogs.com.tw/puma/archive/2008/03/16/1663.aspx
http://www.dotblogs.com.tw/sam19820611/archive/2010/04/14/14589.aspx
http://www.dotblogs.com.tw/joysdw12/archive/2011/11/22/58961.aspx
0 意見: