title: c# MVC3 ajax.beginform to upload file not working
body: <p>After clicking the submit button. I am getting null in entity.
  <strong>Do anyone have a solution?</strong></p>
  
  <p>View</p>
  
  <pre><code>    @using (Ajax.BeginForm("CreateRoom", "Room", new AjaxOptions { HttpMethod = "POST", OnComplete = "window.location.href='Index'" }, new { enctype = "multipart/form-data", id = "ajaxUploadForm" }))
      {
          &lt;input type="file" name="Room" /&gt;
          &lt;input type="submit" value="OK" /&gt;
      }
  </code></pre>
  
  <p>controller</p>
  
  <pre><code>    [HttpPost]
      public ActionResult CreateRoom(RoomFileView entity)
      {
          //code
      }
  </code></pre>
  
  <p>model</p>
  
  <pre><code>     public class RoomFileView
      {
          public RoomFileView();
  
          public int BuildingId { get; set; }
          public int CityId { get; set; }
          public int CountryId { get; set; }
          public int FloorId { get; set; }
          public int LocationId { get; set; }
          public HttpPostedFileWrapper Room { get; set; }
  
          public string Content();
      }
  </code></pre>