title: ASP MVC FIle Upload HttpPostedFileBase is Null
body: <p>In my controller I have, because I wanted to be able to fill out some details about the video and actually upload it, the Video class doesn't need the actual video because it's going to be passed to another web service.</p>
  
  <pre><code>public class VideoUploadModel
      {
          public HttpPostedFileBase vid { get; set; }
          public Video videoModel { get; set; }
      }
  
      //
      // POST: /Video/Create
      [HttpPost]
      public ActionResult Create(VideoUploadModel VM)
      {
          if (ModelState.IsValid)
          {
              db.Videos.AddObject(VM.videoModel);
              db.SaveChanges();
              return RedirectToAction("Index");  
          }
  
          ViewBag.UserId = new SelectList(db.DBUsers, "Id", "FName", VM.videoModel.UserId);
          return View(VM);
      }
  </code></pre>
  
  <p>and in my view I have</p>
  
  <pre><code>@model LifeHighlightsShoeLace.Controllers.VideoController.VideoUploadModel
  @{
     ViewBag.Title = "Create";
  }
  
  &lt;h2&gt;Create&lt;/h2&gt;
  
  &lt;script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>
  
  
  
  <pre><code>@using (Html.BeginForm("Create", "Video", FormMethod.Post, new { enctype = "multipart/form-data" }))
  {
  @Html.ValidationSummary(true)
  &lt;fieldset&gt;
      &lt;legend&gt;Video&lt;/legend&gt;
  
      &lt;div class="editor-label"&gt;
          @Html.LabelFor(model =&gt; model.videoModel.KalturaID)
      &lt;/div&gt;
      &lt;div class="editor-field"&gt;
          @Html.EditorFor(model =&gt; model.videoModel.KalturaID)
          @Html.ValidationMessageFor(model =&gt; model.videoModel.KalturaID)
      &lt;/div&gt;
  
      &lt;div class="editor-label"&gt;
          @Html.LabelFor(model =&gt; model.videoModel.Size)
      &lt;/div&gt;
      &lt;div class="editor-field"&gt;
          @Html.EditorFor(model =&gt; model.videoModel.Size)
          @Html.ValidationMessageFor(model =&gt; model.videoModel.Size)
      &lt;/div&gt;
  
      &lt;div class="editor-label"&gt;
          @Html.LabelFor(model =&gt; model.videoModel.Date)
      &lt;/div&gt;
      &lt;div class="editor-field"&gt;
          @Html.EditorFor(model =&gt; model.videoModel.Date)
          @Html.ValidationMessageFor(model =&gt; model.videoModel.Date)
      &lt;/div&gt;
  
      &lt;div class="editor-label"&gt;
          @Html.LabelFor(model =&gt; model.videoModel.UploadedBy)
      &lt;/div&gt;
      &lt;div class="editor-field"&gt;
          @Html.EditorFor(model =&gt; model.videoModel.UploadedBy)
          @Html.ValidationMessageFor(model =&gt; model.videoModel.UploadedBy)
      &lt;/div&gt;
  
      &lt;div class="editor-label"&gt;
          @Html.LabelFor(model =&gt; model.videoModel.UserId, "User")
      &lt;/div&gt;
  
      &lt;div class="editor-field"&gt;
          @Html.DropDownList("UserId", String.Empty)
          @Html.ValidationMessageFor(model =&gt; model.videoModel.UserId)
      &lt;/div&gt;
      &lt;div class="editor-field"&gt;
      &lt;input name="model.vid" type="file" /&gt;
      &lt;/div&gt;
      &lt;p&gt;
          &lt;input type="submit" value="Create" /&gt;
      &lt;/p&gt;
  &lt;/fieldset&gt;
  </code></pre>
  
  <p>}</p>
  
  <p>When I submit the form the videoModel part of VM is filled out but vid the actual file is null.
  Any ideas?</p>