title: SelectListItem not selected even when explicitly set to true
body: <p>This question relates to ASP.NET MVC 2 RC (December drop).  The basic problem is that when creating a drop down list with a default selected value, the "selected" attribute is either not rendered to HTML or attributed to the wrong option.</p>
  
  <p>Here's some code to demonstrate the wrong option issue:</p>
  
  <p>Here's a function to generate some values [AttributeService class]:</p>
  
  <pre><code>public static Dictionary&lt;int, string&gt; MonthOfBirth
      {
          get
          {
              Dictionary&lt;int, string&gt; months = new Dictionary&lt;int, string&gt;();
              for (int i = 0; i &lt;= 11; i++)
              {
                  months.Add(i, CultureInfo.CurrentUICulture.DateTimeFormat.MonthNames[i]);
              }
              return months;
          }
      }
  </code></pre>
  
  <p>Here's an extension helper to create a list of SelectListItems:</p>
  
  <pre><code>public static List&lt;SelectListItem&gt; ToSelectList&lt;T&gt;(
          this IEnumerable&lt;T&gt; enumerable,
          Func&lt;T, string&gt; text,
          Func&lt;T, int&gt; value,
          string defaultOption
          )
      {
          var items = enumerable.Select(x =&gt; new SelectListItem
          {
              Text = text(x),
              Value = value(x).ToString(),
              Selected = false
          }).ToList();
  
          items.Insert(0, new SelectListItem
          {
              Text = defaultOption,
              Value = "-1",
              Selected = true
          });
  
          return items;
      }
  </code></pre>
  
  <p>This snippet ties the two above together:</p>
  
  <pre><code> public List&lt;SelectListItem&gt; MonthOfBirthList
      {
          get
          {
              return AttributeService.MonthOfBirth.OrderBy(x =&gt; x.Key).ToSelectList(x =&gt; x.Value, x =&gt; x.Key,
                                                   "Month");
          }
      }
  </code></pre>
  
  <p>The first two snippets reside in various classes and the third lives in my ViewModel which the Controller just spits out to the View.  So in my View I then have:</p>
  
  <pre><code>&lt;%=Html.DropDownListFor(x=&gt;x.MonthOfBirth, Model.MonthOfBirthList, new { @class = "panel_4_month" })%&gt;
  </code></pre>
  
  <p>Note that my extension method adds a default SelectListItem in at position index 0, with a default value and Selected = true.  When I put a break point on the Controller to see what the model contains the list is ordered correctly and the correct option is set to selected.</p>
  
  <p>The HTML that I actually get though is this:</p>
  
  <pre><code>&lt;select class="panel_4_month" id="MonthOfBirth" name="MonthOfBirth"&gt;
    &lt;option value="-1"&gt;Month&lt;/option&gt;
    &lt;option selected="selected" value="0"&gt;January&lt;/option&gt;
    &lt;option value="1"&gt;February&lt;/option&gt;
    &lt;option value="2"&gt;March&lt;/option&gt;
    etc...
  &lt;/select&gt;
  </code></pre>
  
  <p>Primary question then is whether my code is wrong or whether there's a bug in the HTML renderer?  I'm happy to upload a VS28K solution with sample code somewhere if this isn't enough information.  Thanks.</p>