I have this much
<asp:Button ID="btnSaveContest" runa开发者_JAVA技巧t="server" Text="Save & Publish Contest" OnClientClick="javascript:changeInputTexts(); return disableAfterClick();"
ValidationGroup="ContestAdd" OnClick="btnSaveContest_Click" />
Now I want to call disableAfterClick()
after all validations are completed. It should be in Client Side. So that I can ensure that the user can click the button only one time.
function ValidateCreateContest() {
Page_ClientValidate();
if (Page_IsValid) {
$('#<%=btnSaveContest.ClientID%>').attr('disabled', 'disabled');
return true;
}
else {
return false;
}
}`
精彩评论