This Microsoft Visual Studio VALIDATING FORMS exercise is provided to allow potential course delegates to assess their suitability for the Wise Owl VISUAL C# 2005 WINDOWS FORMS course only, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.
A full answer to this exercise is provided as part of the training course!
| 1) | Download the files needed to start this exercise: exercise-650.zip (and click here if you experience any problems unzipping this file after downloading it). |
| 2) | Add the form in the above folder to your application, or work with a copy of this form that you have already imported or created. |
| 3) | Add an ErrorProvider control to your form. |
| 4) | Attach code to the Validating event of each of the two text boxes so that:
|
| 5) | Test out your validation: |
This shows that you need to be careful when displaying errors next to textbox controls in panels
|
|
| 6) | Check that your application works, then close down its forms. |
Thank you for showing an interest in this Visual C# 2005 Windows Forms training course! As mentioned above, full answers to this and other exercises are provided on the course. On all Wise Owl scheduled courses delegates can take away these model answers (together with their own efforts!) on a free USB stick.
Recommended sites: C# corner | Computer tutorials | Training classes