title: Error when submitting a strictly typed view containing a partial view populated from enum
body: <p>I am using an enum to store gender data, and used snippet of code in the create controller action to populate a SelectListItem from the enum , then I used a partial view to populate a dropdownlist from the SelectListItem. The dropdownlist shows items correctly. But when I sumbit the form I am getting this exception error.</p>
  
  <p>This is the Enum Definition</p>
  
  <pre><code>public enum GenderEnum { Male = 1, Female = 2 }
  public class Enums
  {
      public enum genderList { Male = 1, Female = 2 };
  }
  public class GenderModel
  {
      public GenderModel()
      {
          GenderList = new List&lt;SelectListItem&gt;();
      }
      [Display(Name = "Gender")]
      public int GenderID { get; set; }
      public IEnumerable&lt;SelectListItem&gt; GenderList { get; set; }
  }
  </code></pre>
  
  <p>This is my Controller Action</p>
  
  <pre><code>public ActionResult Create()
  {
      ViewBag.nationalityId = new SelectList(db.Nationalities, "nationalityId", "nationalityDescription");
      GenderModel gm = new GenderModel();
      IEnumerable&lt;GenderEnum&gt; GenderTypes = Enum.GetValues(typeof(GenderEnum)).Cast&lt;GenderEnum&gt;();
      gm.GenderList = from gender in GenderTypes select new SelectListItem
      {
          Text = gender.ToString(),
          Value = ((int)gender).ToString()
      };
      ViewBag.GenderData = gm;
      return View();
  }
  </code></pre>
  
  <p>I called the partial view from the create view like this</p>
  
  <pre><code>@{ var GenderModel = (recTest.Models.GenderModel)ViewBag.GenderData; }
  
  @Html.Partial("~/Views/Shared/_GenderDropDown.cshtml", GenderModel)
  </code></pre>
  
  <p>and finally this is the partial view </p>
  
  <pre><code>@model recTest.Models.GenderModel
  
  &lt;div class="form-group"&gt;
      @Html.LabelFor(model =&gt; model.GenderID, htmlAttributes: new { @class = "control-label col-md-2" })
      &lt;div class="col-md-10"&gt;
          @Html.DropDownListFor(model =&gt; model.GenderID, Model.GenderList, new { htmlAttributes = new { @class = "form-control" } })
          @Html.ValidationMessageFor(model =&gt; model.GenderID, "", new { @class = "text-danger" })
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>when submit the form I agetting this error</p>
  
  <blockquote>
    <p>Additional information: The model item passed into the dictionary is of type      'recTest.Applicant', but this dictionary requires a model item of type      'recTest.Models.GenderModel'.</p>
  </blockquote>