Could you check that the file exists before running the rest of the code, using :
File.Exists(path);
or check the format of the filename with a regular expression, something like :
Regex myRX = new Regex(@"[A-Z]|[a-z]:\\.+")
f (myRX.IsMatch(MyFile.Poste
{
// do stuff
}
else
{
// or not
}
Main Topics
Browse All Topics





by: mrichmonPosted on 2006-08-04 at 08:38:50ID: 17250836
My guess:
>>the web just sits there when the submit button is hit.
That is because the browser is trying to locate that file for the user to submit it. It can't locate so probably times out looking at the various different paths that it has in the order it is set to look.
>>c:\asdfg
in that case it is looking at a specific path and doesn't find it there, but also doesn't look elsewhere.