title: MVC 3 Razor - Drop down list within Html list
body: <p>I've got a list of objects that have a Name and a list of values and another property representing the SelectedValue.</p>
  
  <p>I wanted to display the Name and then have a drop down - but not sure how to do it!</p>
  
  <p>Can anyone assist please? </p>
  
  <p>With the following example p.Name works, its the p.Values and p.SelectedValues bits that don't!</p>
  
  <pre><code>&lt;div id="gridProps"&gt;
      &lt;ul id="props"&gt;
      @foreach (var p in Model.AvailableProperties)
      {
          &lt;li&gt;@p.Name : @Html.DropDownListFor(p.SelectedValue, p.Values)&lt;/li&gt;
      }
      &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>