title: On Post, a drop down list SelectList.SelectedValue is null
body: <p>My model is as follows:</p>
  
  <pre><code>public class testCreateModel
  {
      public string s1 { get; set; }
      public SelectList DL { get; set; }
  
      public testCreateModel()
      {
          Dictionary&lt;string, string&gt; items = new Dictionary&lt;string, string&gt;();
          items.Add("1", "Item 1");
          items.Add("2", "Item 2");
          DL = new SelectList(items, "Key", "Value");
      }
  }
  </code></pre>
  
  <p>My initiating actions is:</p>
  
  <pre><code>    public ActionResult testCreate()
      {
          testCreateModel model = new testCreateModel();
          return View(model);
      }
  </code></pre>
  
  <p>My Razor view (irrelevant parts deleted) is:</p>
  
  <pre><code>@model Tasks.Models.testCreateModel
  
  @using (Html.BeginForm()) {
  &lt;fieldset&gt;
      &lt;legend&gt;testCreateModel&lt;/legend&gt;
  
      &lt;div class="editor-label"&gt;
          @Html.LabelFor(model =&gt; model.s1)
      &lt;/div&gt;
      &lt;div class="editor-field"&gt;
          @Html.EditorFor(model =&gt; model.s1)
      &lt;/div&gt;
  
      &lt;div class="editor-label"&gt;
          Select an item:
      &lt;/div&gt;
      &lt;div class="editor-field"&gt;
          @Html.DropDownList("dropdownlist", (SelectList)Model.DL)
      &lt;/div&gt;
  
      &lt;p&gt;
          &lt;input type="submit" value="Create" /&gt;
      &lt;/p&gt;
  &lt;/fieldset&gt;
  }
  </code></pre>
  
  <p>The post back action is:</p>
  
  <pre><code>    public ActionResult testCreate(testCreateModel model, FormCollection collection)
      {
          if (ModelState.IsValid)
          {
              Console.WriteLine("SelectedValue: ",model.DL.SelectedValue);
              Console.WriteLine("FormCollection:", collection["dropdownlist"]);
              // update database here...
          }
          return View(model);
      }
  </code></pre>
  
  <p>On post back, model.DL.SelectedValue is null. (However, the selected item can be obtained from FormCollection, but that is besides the point).  The DL object is still properly populated otherwise, Immediate Window output as follows:</p>
  
  <pre><code>model.DL
  {System.Web.Mvc.SelectList}
      base {System.Web.Mvc.MultiSelectList}: {System.Web.Mvc.SelectList}
      SelectedValue: null
  model.DL.Items
  Count = 2
      [0]: {[1, Item 1]}
      [1]: {[2, Item 2]}
  model.DL.SelectedValue
  null
  </code></pre>
  
  <p>Q1: How can I make use of the SelectedValue property instead?</p>
  
  <p>Now, if in the Razor view I change the name of the Html SELECT tag to DL (ie same as the property name in the model):</p>
  
  <pre><code>@Html.DropDownList("DL", (SelectList)Model.DL)
  </code></pre>
  
  <p>I get an exception:</p>
  
  <pre><code>No parameterless constructor defined for this object. 
  Stack Trace: 
  [MissingMethodException: No parameterless constructor defined for this object.]
  System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean&amp; canBeCached, RuntimeMethodHandleInternal&amp; ctor, Boolean&amp; bNeedSecurityCheck) +0
  System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) +98
  System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) +241
  System.Activator.CreateInstance(Type type, Boolean nonPublic) +69
  System.Web.Mvc.DefaultModelBinder.CreateModel(ControllerContext controllerContext, ModelBindingContext bindingContext, Type modelType) +199
  System.Web.Mvc.DefaultModelBinder.BindSimpleModel(ControllerContext controllerContext, ModelBindingContext bindingContext, ValueProviderResult 
  ...
  </code></pre>
  
  <p>Q2: Why?</p>
  
  <p>Thanks.</p>