title: How do I bind multiple dropdownlists
body: <p>I am dynamically loading a partial class with dropdownlists. The dropdownlists represent the many side of a one to many relationship. One person registering with multiple apartments. See pic below. Its all working up to this point. However, when I post back the form, I want the default model binder to collect all the selected values into the List in the viewmodel.</p>
  
  <pre><code>public class RegistrationViewModel
  {
      public RegisterModel RegistrationData { get; set; }
      public List&lt;OccupierApartment&gt; OccupierApartment { get; set; }
      public SelectList ComplexesSelectList { get; set; }
      public SelectList OccupierTypeSelectList { get; set; }        
  }
  </code></pre>
  
  <p>This is my question: What is the lambda syntax for the dropdownlists in the view: Something like this, but its only getting the first item in the list, whereas I need to get all the selected dropdownlists : @Html.DropDownListFor(m => m.OccupierApartment[0].OccupierTypeID, Model.OccupierTypeSelectList, "-- select --")</p>
  
  <p><img src="https://i.stack.imgur.com/AnsyF.png" alt="enter image description here"> </p>