CheckBoxList cannot be validated

| September 25, 2010 | 0 Comments

Problem

Sometimes the stuff doesn’t work in the way they are made to work. While I was trying for validation of CheckBoxList control with CustomValidator, I get runtime exception as

Control ‘CheckBoxList1′ referenced by the ControlToValidate property of ‘chkCustom’ cannot be validated.
So I got stuck with problem CheckBoxList cannot be validated.

Solution

The probable reason (which I think) could be that CustomValidator works only on single control not on group of controls. And hence exception is thrown later. However here are the links to alternative solution for above problem:
  1. Creating custom validation control in Asp.Net
  2. How to add a required validator to a CheckBoxList

Category: Error and Solution

Leave a Reply

%d bloggers like this: