title: Selected value not working for SelectList
body: <p>I found many questions and answers related to this issue but nothing worked for me </p>
  
  <p>I am creating a dropdown list like this</p>
  
  <pre><code>@Html.DropDownListFor(m =&gt; m.SchoolYears, new SelectList(Model.SchoolYears, "YearId", "StartDates", Model.CurrentYearId), new { @class = "field_Dropdown", style = "width:100px;",onchange="return searchStudents();" })
  </code></pre>
  
  <p>(<code>Model.CurrentYearId</code> is of type <code>int</code>)</p>
  
  <p>But it never lets current year selected.</p>
  
  <p>From this post, I got that we should use string for selected value (although I don't know why because it allows object for selected value)</p>
  
  <p><a href="https://stackoverflow.com/questions/5554421/dropdownlist-selectlist-selectedvalue-issue">DropDownList SelectList SelectedValue issue</a></p>
  
  <p>so I tried all these variations </p>
  
  <pre><code>new SelectList(Model.SchoolYears, "YearId", "StartDates", Model.CurrentYearId.ToString())
  
  new SelectList(Model.SchoolYears, "YearId", "StartDates", 2)
  
  new SelectList(Model.SchoolYears, "YearId", "StartDates", "2")
  </code></pre>
  
  <p>But they even didn't work.</p>
  
  <p>There is way to create the select list through linq query or foreach loop and mark selected property of each item but why the above doesn't work?</p>