* "=?Utf-8?B?SmFjaw==?=" <an*******@discussions.microsoft.com> scripsit:
I have a few text boxes on my form and I need in one to allow only
numbers and on the other only letters how to enforce that you can't
enter numbers in a letters textbox and...
Instead of resticting the type of input, I would add code to the
control's 'Validating' event and set an ErrorProvider to make the user
aware of the invalid input. That's more user-friendly because you do
not forbid the user to do editing pasted text from the clipboard
etc. inside the textboxes.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>