Tag Archives: Validating event

Validate a form in C#

The example Use the Validating event in C# explains how you can use a Validating event handler to check a field’s value when focus leaves that field. If the field’s value is invalid, the program can display a message, flag … Continue reading

Posted in controls | Tagged , , , , , , , , | Leave a comment

Use the Validating event in C#

When focus moves from one control to another, the first can fire a Validating event. This only happens if the second control’s CausesValidation property is true. The program can set the Validating event handler’s e.Cancel parameter to true to prevent … Continue reading

Posted in controls | Tagged , , , , , , , , | 1 Comment