Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/75.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 复选框必需的验证器_C#_Javascript_Asp.net_Validation_Checkbox - Fatal编程技术网

C# 复选框必需的验证器

C# 复选框必需的验证器,c#,javascript,asp.net,validation,checkbox,C#,Javascript,Asp.net,Validation,Checkbox,我在asp.net中开发了一个应用程序,在我的页面上有一个复选框,它是必填字段,我在验证后编码,但按save validation时没有调用 <asp:CheckBox ID="ChkContent" runat="server" Text=" I hereby certify that the information above is true and accurate." Font-Bold="true" />

我在asp.net中开发了一个应用程序,在我的页面上有一个复选框,它是必填字段,我在验证后编码,但按save validation时没有调用

<asp:CheckBox ID="ChkContent" runat="server" Text=" I hereby certify that the information above is true and accurate."
                        Font-Bold="true" />
                    <asp:CustomValidator ID="Custom1"  CssClass="errorTop" ClientValidationFunction="CheckBoxValidation" runat="server"
            ErrorMessage="You must select this box to proceed" ></asp:CustomValidator> 
验证函数未调用。

在自定义验证程序控件中添加
ValidationGroup=“AddMisc”

<asp:CheckBox ID="ChkContent" runat="server" Text=" I hereby certify that the information above is true and accurate."
                        Font-Bold="true" />
                    <asp:CustomValidator ID="Custom1"  CssClass="errorTop" ClientValidationFunction="CheckBoxValidation" runat="server"
            ErrorMessage="You must select this box to proceed" ></asp:CustomValidator> 
<asp:CheckBox ID="ChkContent" runat="server" Text=" I hereby certify that the information above is true and accurate."
                        Font-Bold="true" />
                    <asp:CustomValidator ID="Custom1" 
                          CssClass="errorTop" 
                          ClientValidationFunction="CheckBoxValidation" 
                          runat="server"
                          ErrorMessage="You must select this box to proceed"
                          ValidationGroup="AddMisc">
                    </asp:CustomValidator>

在自定义验证器控件中添加
ValidationGroup=“AddMisc”
<asp:CheckBox ID="ChkContent" runat="server" Text=" I hereby certify that the information above is true and accurate."
                        Font-Bold="true" />
                    <asp:CustomValidator ID="Custom1" 
                          CssClass="errorTop" 
                          ClientValidationFunction="CheckBoxValidation" 
                          runat="server"
                          ErrorMessage="You must select this box to proceed"
                          ValidationGroup="AddMisc">
                    </asp:CustomValidator>