title: Razor month dropdown to select current month
body: <p>I've seen that there are plenty of ways to create a dropdown in razor that populates with a range of months and years. But, is there a lightweight way to autoselect the current month in that dropdown without resorting to js/jquery post page render? Let's say it's for a credit card form and I want to make sure that the dropdown autoselects the current month.</p>
  
  <p>In case you need code, here's what I'm working with:</p>
  
  <pre><code>@{
     int[] months = Enumerable.Range(1, 12).ToArray();
  }
  @Html.DropDownListFor(x =&gt; x.ExpirationMonth, 
                       months.Select(x =&gt; 
                            new SelectListItem { 
                              Text = x.ToString(), 
                              Value = x.ToString()
                            }
                       ))
  </code></pre>