I want to see how people would approach this in another way.
Say on a WebForm/WinForm, you have about 10 fields, and you want a different error message for each of them even though all you're testing is that it's filled in, for example "Please fill in your name", "Please fill in your address", etc...
Normally you'd do a bunch of if's, but it gets kind of messy and your brain tells you that there must be another way of doing this.
How would some go about handling this?
-
-
For WebForms there are Validators for these kind of operations.
In WinForms you can hook into validation events and use the ErrorProvider.
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.