C# checking white space in a textbox -
how can check in c# there white space in textbox , perform operation after that?
this ensures multiple spaces caught in check.
bool hasallwhitespace = txtbox1.text.length>0 && txtbox1.text.trim().length==0;
to check single space only:
bool hassinglewhitespace = txtbox1.text == " ";
Comments
Post a Comment