title: How do I save a file to disk?
body: <p>Here is my controller:</p>
  
  <pre><code>    [HttpPost]
      public ActionResult Index(HttpPostedFileBase excelFile)
      {
  
          /*Somewhere here, I have to save the uploaded file.*/
  
          var fileName = string.Format("{0}\\{1}", Directory.GetCurrentDirectory(), excelFile.FileName);
          var connectionString = string.Format("Provider=Microsoft.Jet.OLEDB.4.0; data source={0}; Extended Properties=Excel 8.0;", fileName);
  
          var adapter = new OleDbDataAdapter("SELECT * FROM [workSheetNameHere$]", connectionString);
          var ds = new DataSet();
          adapter.Fill(ds, "results");
  
          DataTable data = ds.Tables["results"];
  
          return View();
      }
  </code></pre>