Validating two usercontrols

If none of the other validators can help you, the Custom Validator usually can.

Google searches only pointed out that other people have had the same problem and resolved it by changing the property name from Text to something else, like Text Data.

Since this button belongs to the ‘First’ validation group, it initiates the validaton controls that belongs to that group.

Similarly clicking the ‘Submit2’ button throws an error message if the Text Box3 is left blank.

The problem with this article is that it deals with a user control that handles complex data binding. More searching got us to the Walkthrough: Creating a User Control that Supports Simple Data Binding article. During some more research, we ran across a newsgroup thread that mentioned the User Control object does some special overriding of the Text property.

Not only does it disable data binding, the property is not browsable in the designer. Text property defines We tried adding the following line to the control class: Public Event Text Changed As Event Handler This gave us the ubiquitous squiggly indicating a problem.

Search for validating two usercontrols:

validating two usercontrols-90validating two usercontrols-81validating two usercontrols-64

Leave a Reply

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

One thought on “validating two usercontrols”