开发者

ValidationGroup in ASP.NET

开发者 https://www.devze.com 2023-04-02 12:23 出处:网络
I have this much <asp:Button ID=\"btnSaveContest\" runa开发者_JAVA技巧t=\"server\" Text=\"Save &amp; Publish Contest\" OnClientClick=\"javascript:changeInputTexts(); return disableAfterClick()

I have this much

<asp:Button ID="btnSaveContest" runa开发者_JAVA技巧t="server" Text="Save &amp; 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;
    }      

}`
0

精彩评论

暂无评论...
验证码 换一张
取 消