如果选中复选框,请如何禁用所需的字段验证器。
以下是文本框和必填字段验证器的代码。
<asp:CheckBoxList ID="business_owner_CheckBox" runat="server">
<asp:ListItem Value="1" Selected="false">I am a business owner</asp:ListItem>
</asp:CheckBoxList>
<asp:TextBox ID="business_name_Textbox" runat="server" CssClass="login-form-control col-xs-12 col-sm-12 col-md-12"
placeholder="Business Name"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="business_name_Textbox"
ValidationGroup="CreateUserWizard1"></asp:RequiredFieldValidator>