title: Posting an array of HTML.DropDownList values to controller action method
body: <p>So in my view I am dynamically creating dropdown lists in a for loop. I use the same name value in unique id values.</p>
  
  <pre><code>@foreach(var item in Model.Items)
  {
     @Html.DropDownList("Items" Model.GenerateSelectList(item.id), new { id = item.id })
  }
  </code></pre>
  
  <p>In my controller action method for the post I can get the values of the dropdowns like this:</p>
  
  <pre><code>[HttpPost]
  [ValidateAntiForgeryToken]
  [Authorize]
  public ActionResult ClassicLineup(IList&lt;int&gt; items)
  {
  }
  </code></pre>
  
  <p>I cannot figure out how to get <strong>BOTH</strong> the dropdown id and associated value.</p>
  
  <p>Seems like it should be simple but it has me stumped...</p>
  
  <p>Thanks.</p>