I have a Panel
based user control. This is just a simple dashboard with 3 DropDownLists. If I add CompareValidator
to my WebForm and assign the ControlToValidate
property to the identifier of my custom control, I get the following error:
Control '{0}' referenced by the ControlToValidate property of '{1}' cannot be validated.
I understand why CompareValidator cannot intelligently test anything against Panel
. So what do I need to add to my user control so that the validator can validate it?
I tried adding a Text
property to my panel, which returns a combination of Text properties from 3 DropDownLists. Not.
I tried to find specific interfaces ( ITextControl
) that implement proven controls ( TextBox
) and add them to my user control. Not.
How can I create my own custom Panel-based control that can be checked with regular .net calibrators? (RequiredFieldValidator, CompareValidator, etc.)
Bazzz source share