Right now, I'm using this to allow a file to be moved to our server:
filUpload.PostedFile.SaveAs(Server.MapPath("~/Images/" + filUpload.FileName));
However when I don't upload a file, it gives me an error:
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\**\**\Documents\Visual Studio 2010\WebSites\**\Images\'.
How do I make the file upload optional so users don't have to upload a file?
Many thanks