J
jphaycock
Hi
I have a webform in a sub folder called admin. The form has a file
upload control on it. I'm trying to upload an image file to the root
images folder of the app like this:
filePath = "~/images/" + myUploadControl.FileName;
myUploadControl.SaveAs(filePath);
I get an error about a rooted path:
There was a problem uploading the file: System.Web.HttpException: The
SaveAs method is configured to require a rooted path and the path bla
bla bla is not rooted.
Can anyone tell me how to do this. I've wasted an entire morning on it
and have a tight deadline looming
Thanks
John
I have a webform in a sub folder called admin. The form has a file
upload control on it. I'm trying to upload an image file to the root
images folder of the app like this:
filePath = "~/images/" + myUploadControl.FileName;
myUploadControl.SaveAs(filePath);
I get an error about a rooted path:
There was a problem uploading the file: System.Web.HttpException: The
SaveAs method is configured to require a rooted path and the path bla
bla bla is not rooted.
Can anyone tell me how to do this. I've wasted an entire morning on it
and have a tight deadline looming
Thanks
John