B
B Letts
Hi -
I'm currently using the FileUpload control to allow people to upload
files to my website. This all works fine, as long as I'm going to a
physical path on my server.
However, I need to allow people to upload to a virtual directory. The
directory may or may not exist on the same server as the Web site.
I can't seem to figure out how to do this. If I pass the virtual
directory address to FileUpload.SaveAs, it tells me I need a rooted
directory. If I try to get the physical directory name from
Server.MapPath, it throws an exception.
Is there any way to either get the physical path to a virtual directory
so I can pass it to FileUpload.SaveAs, or an alternative method to
upload/delete files to and from a virtual directory?
Thanks in advance.
I'm currently using the FileUpload control to allow people to upload
files to my website. This all works fine, as long as I'm going to a
physical path on my server.
However, I need to allow people to upload to a virtual directory. The
directory may or may not exist on the same server as the Web site.
I can't seem to figure out how to do this. If I pass the virtual
directory address to FileUpload.SaveAs, it tells me I need a rooted
directory. If I try to get the physical directory name from
Server.MapPath, it throws an exception.
Is there any way to either get the physical path to a virtual directory
so I can pass it to FileUpload.SaveAs, or an alternative method to
upload/delete files to and from a virtual directory?
Thanks in advance.