Sarath Kumar

Sarath Kumar

  • NA
  • 443
  • 338.7k

File path

Dec 12 2014 1:34 AM

I am trying to read the file data using uploaded file from fileupload control. but i am getting wrong path.

see this path: Could not find file 'C:\Program Files (x86)\Common Files\Microsoft Shared\DevServer\10.0\contact.csv'.

But i am uploading file from Desktop.

Here is my code:

       protected void btnUpload_Click(object sender, EventArgs e)         {             if (FileUpload1.HasFile)             {                 string csv_file_path = FileUpload1.PostedFile.FileName;                 //string csv_file_path = Path.GetFullPath(FileUpload1.PostedFile.FileName);                 DataTable csvData = GetDataTabletFromCSVFile(csv_file_path);             }         }

anyone knows help me guys......


Answers (1)