i have a webpage in that i have a text box, my requirement is i don’t want to give space in the textbox if user give space in textbox it give indication no space in the textbox
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you intended to capture a value where spaces aren’t a valid character, you could use a RegularExpressionValidator:
This would prevent “hello world” and “data base” since they contain spaces, and would only allow “helloworld” and “database” as valid values. You must use a RequiredFieldValidator in conjunction with it to prevent blank entries since the RegularExpressionValidator does not prevent that on its own.
Specify the name of the textbox in the
ControlToValidateproperty.