My Text box can accept all types of data like alphabets,numer ic,special characters ... Should give an error message if space is not a valid value. ... in
asp.net with c# through javascript.
My Text box can accept all types of data like alphabets,numer ic,special characters ... Should give an error message if space is not a valid value. ... in
asp.net with c# through javascript.
not sure exactly what the question is, but it sounds like it shouldn't accept spaces? there isn't any reason why it shoulnd't. The only thing i can think of is do like an event for the submit that validates that there aren't any spaces, which is just a regular expression.
My Text box can accept all types of data like alphabets,numer ic,special characters ... Should give an error message if space is not a valid value. ... in
asp.net with c# through javascript.
First you should do validation in your server side code (check if the string contains spaces). This way if your user is able to get around your JavaScript check then your server side code still won't use the invalid data.
Comment