string filePath,fileName; if (FileUpload1.PostedFile != null) { filePath = FileUpload1.PostedFile.FileName; // file name with path. fileName = FileUpload1.FileName;// Only file name. }
String Path = HttpContext.Current.Request.PhysicalApplicationPath + FileUpload1.FileName; Or try this String Path = Server.MapPath(FileUpload1.FileName);
string fileBasePath = Server.MapPath("~/"); string fileName = Path.GetFileName(this.MyFileUploader.FileName); string fullFilePath = fileBasePath + fileName;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)