开发者

ValidationGroup in ASP.NET

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜