title: upload image from view to controller mvc
body: <p>Good day, </p>
  
  <p>I am trying to upload an image from my view</p>
  
  <pre><code>@using (Html.BeginForm("CrearCurso", "ProfesorCurso", null, FormMethod.Post, new { enctype = "multipart/form-data" }))
  {
     &lt;div class="form-group"&gt;
      &lt;label&gt;Upload Image&lt;/label&gt;
      &lt;div class="input-group"&gt;
          &lt;span class="input-group-btn"&gt;
              &lt;span class="btn btn-default btn-file"&gt;
                  Browse… &lt;input type="file" id="imgInp"&gt;
              &lt;/span&gt;
          &lt;/span&gt;
          &lt;input type="text" class="form-control" readonly&gt;
      &lt;/div&gt;
      &lt;img id='img-upload'/&gt;
  &lt;/div&gt;
  }
  </code></pre>
  
  <p>I have this controller in mvc</p>
  
  <pre><code>  [HttpPost]
      public ActionResult CrearCurso(CursoViewModel CursoViewModel, HttpPostedFileBase imgInp)
      {
  
          return View();
      }
  </code></pre>
  
  <p>However when I inspect the HttpPsotedFileBase, it is empty. What is wrong here? thanks</p>