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.

Search for validating user control:

validating user control-58validating user control-63validating user control-41validating user control-62

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “validating user control”

  1. A parent cannot collect a second time when payment has been made to a minor for a service such as an employment service when rendered. In the state of Arizona, legal age is eighteen (18) years for both men and women (see Revised Statute Section 1-215).

  2. I don’t know about you but I really hate it when you wanna bust a nut to one of these adult cam websites and you’re fumbling around trying to grab a credit card or searching for one that’s legit AND has hot chicks working on them. There’s a harsh truth that most guys are unaware of…. 99% of these sites are FAKE as hell and completely suck.