title: Use content of FileUpload
body: <p>I am attempting to add a file import function to an admin webpage where a CSV file will be imported from a local C: drive</p>
  
  <p>I've just realized that <code>string filePath = Path.GetFileName(FileUpload1.FileName);</code> doesn't actually allow the client path to be read and only gives the filename.</p>
  
  <pre><code>protected void btnImportData_Click(object sender, EventArgs e)
  {
    List&lt;CSVFile&gt; entries = new List&lt;CSVFile&gt;();
  
    string filePath = Path.GetFileName(FileUpload1.FileName);
    using (TextFieldParser parser = new TextFieldParser(filePath))
    {
  
      //Other code
    }
  
  }
  </code></pre>
  
  <p>Currently the line <code>TextFieldParser parser = new TextFieldParser(filePath)</code> gives an error as I can't get the full path to the CSV.</p>
  
  <p>Is it possible to load the contents of <code>FileUpload1</code> into variable <code>parser</code> instead? I can see the control has content but not sure how or if it's possible?</p>