Reputation: 1
How could i validate a textbox in vb.net, so that it gives error message if i enter anything like , or .
Upvotes: 0
Views: 107
Reputation: 12613
You can add an event handler for the TextBox's Validating
event to check for invalid characters.
If there is an invalid character, you can set the Cancel
property of the Validating event's e
parameter to True
.
Check this out for more information: Control.Validating
Upvotes: 1