title: DropdownList is null when Form is submitted (MVC3)
body: <p>I have a create page and have dropdownlist. My problem is that when I submit the form the dropdownlist is null. Help please. Here's my code.</p>
  
  <p><strong>Class</strong></p>
  
  <pre><code> public class Product
      {
          public int Id { get; set; }
          public string Name { get; set; }
          public string Description { get; set; }
          public List&lt;SelectListItem&gt; Types { get; set; }
      }
  </code></pre>
  
  <p><strong>Create (GET)</strong></p>
  
  <pre><code>        // GET: /Products/Create
  
          public ActionResult Create(string id)
          {
              List&lt;Product&gt; products;
              if (Session["products"] != null) products = Session["products"] as List&lt;Product&gt;;
              else products = new List&lt;Product&gt;();
              var product = products.FirstOrDefault(x =&gt; id != null &amp;&amp; x.Id == int.Parse(id))??new Product();
              var types = new List&lt;SelectListItem&gt;();
              var type = new SelectListItem { Selected = false, Value = "0", Text = "Electronics" };
              types.Add(type);
              type = new SelectListItem { Selected = false, Value = "1", Text = "Non-Electronics" };
              types.Add(type);
              product.Types = types.Select(x =&gt; new SelectListItem { Value = x.Value, Text = x.Text }).ToList();
              return View(product);
          } 
  </code></pre>
  
  <p><strong>View</strong></p>
  
  <p>@model MVCViewState.Models.Product</p>
  
  <pre><code>@{
      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;
  &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;Product&lt;/legend&gt;
  
          &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.Description)
          &lt;/div&gt;
          &lt;div class="editor-field"&gt;
              @Html.EditorFor(model =&gt; model.Description)
              @Html.ValidationMessageFor(model =&gt; model.Description)
          &lt;/div&gt;
          &lt;div class="editor-label"&gt;
              @Html.LabelFor(model =&gt; model.Types)
          &lt;/div&gt;
          &lt;div class="editor-field"&gt;
              @Html.DropDownListFor(model =&gt; model.Types, Model.Types)
              @Html.ValidationMessageFor(model =&gt; model.Types)
          &lt;/div&gt;
          &lt;p&gt;
              &lt;input type="submit" value="Create" /&gt;
          &lt;/p&gt;
      &lt;/fieldset&gt;
  }
  
  &lt;div&gt;
      @Html.ActionLink("Back to List", "Index")
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Create (POST)</strong></p>
  
  <p><img src="https://i.stack.imgur.com/I4vE2.png" alt="enter image description here">
  <img src="https://i.stack.imgur.com/H0mUS.png" alt="enter image description here"></p>