New developers at least get this exception one time in life. The error is “Control ‘CheckBoxList1’ referenced by the ControlToValidate property of ‘RequiredFieldValidator1’ cannot be validated“. Here in this simple tip I will describe why this error occurred and how we can resolve this error.
In Asp.Net we have a bundle of validator. RequiredFieldValidator is one of them and a more popular validator. To use the RequiredFieldValidator Control at first we assign ControlToValidate property for which we need to set the field as a required field. But if you assign a CheckBoxList in ControlToValidate property you got the exception.
First of all we can not use RequiredFieldValidator for CheckBoxLIst. We have to use CustomValidator Control to reslove the issue. For the solution please go through my below article:
Hope your problem will be resolved. Happy coding!