title: HttpPostedFileBase returns null
body: <p>I am trying to upload a single .csv file in ASP.NET MVC. In my .ascx file, I have:</p>
  
  <pre><code>        &lt;div&gt;           
              &lt;input type="file" name="file" id="file" /&gt;
              &amp;nbsp &amp;nbsp
             &lt;input type="submit" name="btnSubmit" id="btnSubmit" value="Upload" /&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p>The controller action is:</p>
  
  <pre><code> public ActionResult Upload(HttpPostedFileBase file)
          {
              if (file.ContentLength &gt; 0)
              {
                  var fileName = Path.GetFileName(file.FileName);
                  var path = Path.Combine(Server.MapPath("~/App_Data/uploads"), fileName);
                  file.SaveAs(path);
              }
              return View();
          }
  </code></pre>
  
  <p>The problem is that I always get file as Null in the Upload Action. Any suggestions on how to get this working?</p>