The file input type does not work in chrome and i think safari
when i try to upload a file only the filename AND NOT THE PATH is passed from the file upload component.
this is an issue because for the code to work it needs to know where the file is.
I am using the simplest method
<asp:FileUpload ID="File1" runat="server" />
string fn = System.IO.Path.GetFileName(File1.PostedFile.FileName);
string SaveLocation = Server.MapPath("") + "\\" + File1.PostedFile.FileName;
Response.Write("The file has been uploaded." + fn);
catch (Exception ex)
Response.Write("Error: " + ex.Message);
which returns the actual filename and not the path
thanks in advance.