• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 502
  • Last Modified:

validating TextBox In vb.net

How can i be able to validate
textbox's  text
and restrict the user only to enter
alphabets or number
in a particular text box.

Please provide me code for doing this
0
code_me
Asked:
code_me
  • 3
1 Solution
 
mayank_joshiCommented:
0
 
Pratima PharandeCommented:
you can use validator to your textbox, you can use regularexpressionvalidator, because it is simple with this ,

you just place regularexpressionvalidator on your page and set Controltovalidate property of the validator to textbox at  properties. Then set validation expression property of validator to [0-9a-zA-Z]* .
0
 
mayank_joshiCommented:
if you are using a windows based application ( i guess so ) you would not find regular expression validator in it.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now