hELLO Folks!
am getting this error in my page, pls help to get rid of it
The filename, directory name, or volume label syntax is incorrect.
Line 168: // Providing Path
Line 169: string excelpath = Server.MapPath("~/Files/") + Path.GetFileName(FileUpload1.PostedFile.FileName);
Line 170: FileUpload3.SaveAs(excelpath);
Line 171:
Line 172: string conString = string.Empty;

Khan Abrar AhmedPosted Jul 22, 2014, 5:14 AM
What is actual path you are getting when u execute the below line of code
string excelpath = Server.MapPath("~/Files/") + Path.GetFileName (FileUpload1.PostedFile. FileName);
check the path in "excelpath" ( value of this constant) and try to check the value or path you are getting in this veriable are correct or not.
Abhishek JaiswalPosted Jul 22, 2014, 4:52 AM
here's path
string excelpath = Server.MapPath("~/Files/") + Path.GetFileName(FileUpload1.PostedFile.FileName);
FileUpload1.SaveAs(excelpath);
but the error is:
Khan Abrar AhmedPosted Jul 22, 2014, 3:57 AM
Check the
excelpath what path you are getting and that path is correct or not to save the file.