title: MVC dropdownlist set selected value
body: <p>Hey I have tried following to set the selected value for dropdownlist.
  In My controller:</p>
  
  <pre><code>u.Roles = new List&lt;AspNetRole&gt;();
  foreach (var role in db.AspNetRoles)
  {
      u.Roles.Add(role);
  }
  </code></pre>
  
  <p>And in my View:</p>
  
  <pre><code> @Html.DropDownList(Model.role.Id, new SelectList(Model.Roles, "Id", "Name"), htmlAttributes: new { @class = "form-control"})
  </code></pre>
  
  <p>But still not working, I did not got the selected value. When debugging I can see that <code>Model.role.Id</code> contains the selected value.</p>
  
  <p>Note also that the Id is of type string, because it is hashed. 
  What I am doing wrong?</p>