Validating user control
Once the Validation Group property is created you can set it from the Web Form as follows: As you can see the Validation Group property of Test UC1 and Test UC2 is set to some different and unique value.
Now the individual user controls will work as expected.
when the page is validated the content of the UC should also be validated.
So I had my UC implement the IValidator interface, which worked well except that I could not set the validation group on the user control.
Recently I stumbled across the problem of needing to validate user input supplied to a Custom User Control.
Usually validation is simply the case of dragging one of the excellent validation controls onto the page and pointing it towards the control you wish to validate.
Stumbled across something i cant really see where the problem is.
To overcome this problem you can take two approaches: The first solution requires you to create a property (say Validation Group) in the user control.Apparently I'm supposed to inherit from Base Validator to do that, but I can't since I'm already inheriting User Control.There's got to be a way to deal with this common scenario.Custom User Control's however are a different story.These are controls written by a developer to carry out a function which no other existing controls can.