user637215
user637215

Reputation: 1

vb.net windows form

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

Answers (2)

Alex Essilfie
Alex Essilfie

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

Anuraj
Anuraj

Reputation: 19598

There is no inbuilt validation controls available Windows Forms.

Upvotes: 0

Related Questions