Click here to Skip to main content
15,888,106 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hi,

I want to validate Text box.

Hint : Text Box should contain character[a-z] and space key and back space key and apostrophe.
It should not contain rest other keys except the keys given above.

Zakaria.
Posted
Comments
Thomas Daniels 16-Feb-15 6:11am    
In Windows Forms, WPF, ASP.NET, ...?
Thanks7872 16-Feb-15 6:11am    
This is just a list of your requirement. Where is the question? What have you tried so far?
Zakaria Jagral 16-Feb-15 6:14am    
tried means I want to validate my Text Box
please help me.
Prerak Patel 16-Feb-15 6:23am    
He is just asking what you have tried for the given problem.

1 solution

If that's ASP.Net, you can use validators[^].
You should use Regular Expression[^] for your requirement.

For WinForms, you need to use Validating[^] event.

Try it on your own. Put some efforts and get back.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900