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.
-1
chaser12
6/14/2005 3:30:36 PM
📁 asp.net.getting-started
📃 91979 articles.
⭐ 4 followers.

💬 2 Replies
👁️‍🗨️ 2294 Views

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

1
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.
1
XIII
6/14/2005 5:17:10 PM
Reply: