space

How can I search for empty space in the textbox and if it is one i need to display error message. This is for the prevent user the enter filename with space.
0 chaser12 6/14/2005 3:30:36 PM
You can always just replace any spaces with no space...

In VB it would be....

Replace(myTextBox.Text, " ", "")

And in C# it would be.....

myTextBox.Text.Replace(" ", "");


Hope this helps,

Zath

0 Zath 6/14/2005 4:05:13 PM
Using regular expressions would be a good way to go for this task. Please take a look at this site: regexlib.

Grz, Kris.
Read my blog. Handy Firefox plugins for web developers.


Workaround for non working Mark as answer buttons.
0 XIII 6/14/2005 5:17:10 PM
Reply:

(Thread closed)