title: ASP.NET MVC multiple select dropdown
body: <p>I am using the following code to let user select multiple locations on the form.</p>
  
  <pre><code>@Html.DropDownListFor(m =&gt; m.location_code, Model.location_type, new { @class = "form-control", @multiple = "multiple" }).
  </code></pre>
  
  <p>location_code is an <code>List&lt;int&gt;</code> and location_type is <code>List&lt;SelectListItem&gt;</code> populated with data.</p>
  
  <p>The code does return me the selected values in the controller, but when the user clicks on edit button the object passed does not show the selected values but instead shows the normal initialized dropdown with nothing selected.</p>
  
  <p>What i actually want is that once the user submits the form (including the multiple selected values) it goes to  a page where user confirms if the details are correct.If not he presses edit button and the object is again passed to controller.In this phase it should show the multiple values selected.Other fields behave properly .</p>
  
  <p>Any insight on this ?</p>