The trick is to realize that the Data Event Args instance passed to the event handler, is a validate Event Args – a specialization of Data Event Args.The platform will keep raising the on Validating events until an event handler returns a negative result.Creating a resume upload form where user must upload attachment.

If a user is tabbing through the form and tabs from the text box, the validating/validated events are fired. Once the value is cached, the next time the user tabs through the box, the validating event will check to see if the _Cache is different from the . If so that is when I would like to raise the validating event to the parent form (as well as the validated event).

If the e-mail address is not in the standard format (containing "@" and "."), the validation fails, an Error Provider icon is displayed, and the event is canceled.

This example requires that a Text Box and Error Provider control have been created on a form.

My Custom Control is created with Text Box and Combo Box.

And i want to use Validating event for this control. Validating this means that will work for Tet Box which is ok.

Leave a Reply