1

如何让我的复选框 cbTermsandcond 的 customvalidator 显示在我的验证摘要中?

目前,错误消息显示在正在验证的复选框旁边。

<div class="mainbookingcheckboxleft">
    <asp:CheckBox ID="cbTermsandcond" runat="server" />
    <asp:CustomValidator ID="CustomValidator1" runat="server" 
        ErrorMessage="You must agree with our Terms and Conditions" 
            onservervalidate="CustomValidator1_ServerValidate">
    </asp:CustomValidator>

    <asp:ValidationSummary ID="ValidationSummary1" runat="server" 
        ShowMessageBox="true"  ShowSummary="False" />
</div>

请注意,我网页上的RequiredFieldValidator 控件在验证摘要中正确显示为弹出框。

4

0 回答 0