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.
CSSLine 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 AhmedRank #778 · 3K reputationPosted Jul 21, 2014, 11:57 PM EDT
Check the
Abhishek JaiswalRank #126 · 17.5K reputationPosted Jul 22, 2014, 12:52 AM EDT
here's path
string excelpath = Server.MapPath("~/Files/") + Path.GetFileName(FileUpload1.PostedFile.FileName);
FileUpload1.SaveAs(excelpath);
but the error is:
Khan Abrar AhmedRank #778 · 3K reputationPosted Jul 22, 2014, 1:14 AM EDT
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.