title: File Upload Control Get Returned Null
body: <p>Whenever i am clicking on submit after uploading file, it gets returned null, i have used all the necessary conditions required for upload file but still getting the issue, i have seen all the answers in stack overflow , i have used enctype and name of file upload is also same as what i am passing controller</p>
  
  <pre><code>public ActionResult Create()
          {
              return View();
          }
  
  
          [HttpPost]
          [ValidateAntiForgeryToken]
          public ActionResult Create([Bind(Include = "Officername,Designation,FileBeforeTour,FileAfterTour,FileBeforeTourName,FileAfterTourName")] FileDetails fileDetails)
          {
                if (ModelState.IsValid)
                {
                  string uploadedfilename = Path.GetFileName(fileDetails.filebeforetourupload.FileName);
                  if (!string.IsNullOrEmpty(uploadedfilename))
                  {
  
  
                      db.FileUpload.Add(fileDetails);
                      db.SaveChanges();
                      return RedirectToAction("Index");
                  }
                }
  
              return View(fileDetails);
          }
  </code></pre>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.ComponentModel.DataAnnotations;
  using System.ComponentModel.DataAnnotations.Schema;
  using System.Linq;
  using System.Web;
  
  namespace OnlineStationaryRegister.Models
  {
      public class FileDetails
      {
          [Key]
          public int FileId { get; set; }
          public string Officername { get; set; }
          public string Designation { get; set; }
          public string FileBeforeTour { get; set; }
          public string FileAfterTour { get; set; }
          public string FileBeforeTourName { get; set; }
          public string FileAfterTourName { get; set; }
          [NotMapped]
          public HttpPostedFileBase filebeforetourupload { get; set; }
          [NotMapped]
          public HttpPostedFileBase fileaftertourupload { get; set; }
      }
  }
  </code></pre>
  
  <pre><code>@model OnlineStationaryRegister.Models.FileDetails
  
  @{
      ViewBag.Title = "Create";
  }
  
  &lt;h2&gt;Create&lt;/h2&gt;
  
  
  @using (Html.BeginForm("Create","File",FormMethod.Post, new { enctype = "multipart/form-data" }))
  {
      @Html.AntiForgeryToken()
  
      &lt;div class="form-horizontal"&gt;
          &lt;h4&gt;FileDetails&lt;/h4&gt;
          &lt;hr /&gt;
          @Html.ValidationSummary(true, "", new { @class = "text-danger" })
          &lt;div class="form-group"&gt;
              @Html.LabelFor(model =&gt; model.Officername, htmlAttributes: new { @class = "control-label col-md-2" })
              &lt;div class="col-md-10"&gt;
                  @Html.EditorFor(model =&gt; model.Officername, new { htmlAttributes = new { @class = "form-control" } })
                  @Html.ValidationMessageFor(model =&gt; model.Officername, "", new { @class = "text-danger" })
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div class="form-group"&gt;
              @Html.LabelFor(model =&gt; model.Designation, htmlAttributes: new { @class = "control-label col-md-2" })
              &lt;div class="col-md-10"&gt;
                  @Html.EditorFor(model =&gt; model.Designation, new { htmlAttributes = new { @class = "form-control" } })
                  @Html.ValidationMessageFor(model =&gt; model.Designation, "", new { @class = "text-danger" })
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div class="form-group"&gt;
              @Html.Label("File", htmlAttributes: new { @class = "control-label col-md-2" })
              &lt;div class="col-md-10"&gt;
                  &lt;input type="file" name="filebeforetourupload" /&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
          @*&lt;div class="form-group"&gt;
              @Html.LabelFor(model =&gt; model.FileAfterTour, htmlAttributes: new { @class = "control-label col-md-2" })
              &lt;div class="col-md-10"&gt;
                 &lt;input type="file" name="fileaftertourupload" /&gt;
              &lt;/div&gt;
          &lt;/div&gt;*@
  
  
  
          &lt;div class="form-group"&gt;
              &lt;div class="col-md-offset-2 col-md-10"&gt;
                  &lt;input type="submit" value="Create" class="btn btn-default" /&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  }
  
  &lt;div&gt;
      @Html.ActionLink("Back to List", "Index")
  &lt;/div&gt;
  
  @section Scripts {
      @Scripts.Render("~/bundles/jqueryval")
  }
  
  </code></pre>