title: mvc3 razor dropdownlistfor causing update model to fail
body: <p>I have a problem with the following code. Basically when I call updatemodel it fails but I dont get an inner exception. If i change the drop down to a text box it works.</p>
  
  <p>class:</p>
  
  <pre><code>public class Member
  {
      [Key]
      public int MemberID { get; set; }
      [StringLength(50),Required()]
      public string Name { get; set; }
      [Range(0,120)]
      public short Age { get; set; }    
      [Required(),MaxLength(1)]
      public string Gender {get; set;}
      [Required()]
      public virtual Team Team { get; set; }
  
  }
  </code></pre>
  
  <p>controller methods:</p>
  
  <pre><code>[HttpGet]
      public ActionResult ViewMember(int id)
      {
          try
          {
              var m = db.GetMember(id);
              var maleItem = new SelectListItem{Text = "Male", Value= "M", Selected=m.Gender == "M"};
              var femaleItem = new SelectListItem{Text = "Female", Value="F", Selected=m.Gender == "F"};
              List&lt;SelectListItem&gt; items = new List&lt;SelectListItem&gt;();
              items.Add(maleItem);
              items.Add(femaleItem);
              var genders = new SelectList(items, "Value", "Text");
              ViewBag.Genders = genders;
  
              return View(m);
          }
          catch (Exception ex)
          {
              return View();
          }
      }
  
      [HttpPost]
      public ActionResult ViewMember(Member m)
      {
          try
          {
              var member = db.GetMember(m.MemberID);
              m.Team = db.GetTeam(member.Team.TeamID);
              UpdateModel(member);
              db.Save();
              return RedirectToAction("ViewMembers", new { id = member.Team.TeamID });
          }
          catch (Exception ex)
          {
              return View();
          }
      }
  </code></pre>
  
  <p>and finally cshtml code:</p>
  
  <pre><code>@model GreenpowerAdmin.Models.Member
  @using GreenpowerAdmin.Helpers
  
  @{
  ViewBag.Title = "ViewMember";
  }
  
  &lt;h2&gt;ViewMember&lt;/h2&gt;
  
   &lt;script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"&gt;     &lt;/script&gt;
  &lt;script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"&gt;&lt;/script&gt;
  
  @using (Html.BeginForm()) {
  @Html.ValidationSummary(true)
  &lt;fieldset&gt;
      &lt;legend&gt;Member&lt;/legend&gt;
  
      @Html.HiddenFor(model =&gt; model.MemberID)
  
      &lt;div class="editor-label"&gt;
          @Html.LabelFor(model =&gt; model.Name)
      &lt;/div&gt;
      &lt;div class="editor-field"&gt;
          @Html.EditorFor(model =&gt; model.Name)
          @Html.ValidationMessageFor(model =&gt; model.Name)
      &lt;/div&gt;
  
      &lt;div class="editor-label"&gt;
          @Html.LabelFor(model =&gt; model.Team.Name)
      &lt;/div&gt;
      &lt;div class="editor-field"&gt;
          @Html.DisplayFor(model =&gt; model.Team.Name)
          @Html.ValidationMessageFor(model =&gt; model.Team.Name)
      &lt;/div&gt;
  
      &lt;div class="editor-label"&gt;
          @Html.LabelFor(model =&gt; model.Age)
      &lt;/div&gt;
      &lt;div class="editor-field"&gt;
          @Html.EditorFor(model =&gt; model.Age)
          @Html.ValidationMessageFor(model =&gt; model.Age)
      &lt;/div&gt;
  
      &lt;div class="editor-label"&gt;
          @Html.LabelFor(model =&gt; model.Gender)
      &lt;/div&gt;
      &lt;div class="editor-field"&gt;
          @Html.DropDownList("Gender", ViewBag.Genders as SelectList)            
          @Html.ValidationMessageFor(model =&gt; model.Gender)
      &lt;/div&gt;
  
      &lt;p&gt;
          &lt;input type="submit" value="Save" /&gt;
      &lt;/p&gt;
  &lt;/fieldset&gt;
  }
  
  &lt;div&gt;
      @Html.ActionLink("Back to List", "ViewMembers", new { id=Model.Team.TeamID })
  &lt;/div&gt;
  </code></pre>
  
  <p>When I click the save button the updatemodel line fails. As said above, it doesn't fail if I use a text box for gender. Does anyone know what is making it fail or how to debug it?</p>