|
-
Oct 5th, 2007, 12:33 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] [2005] Validating Path
The user enters a path name into a textbox. I need to make sure this path name is valid, whether it exists or not.
The function System.IO.Path.GetInvalidFileNameChars() doesn't help with this because according to it, the colon ( is an allowable character. Unfortunately it isn't a universally allowable character.
That is: 'C:\MyFolder' is a valid folder name. However 'C:\My:Folder" is not.
While I could write code to detect for a colon in any position except character 1 in the textbox text, that seems very VB version 4. I would think that the Microsoft crew would anticipate something like this and have a built in class.
Is there one? System.IO doesn't appear to have one and this is where the Path object lives.
Anyone???
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|