title: How to use DropDownListFor
body: <p>I want to add Drop Down List html control to the web page fill it with products list. My Action controller looks like</p>
  
  <pre><code>public ActionResult Index()
  {
      return View(_repository.GetProducts(true));
  }
  </code></pre>
  
  <p>Product model (Linq to SQL, below is partial class where SelectedId is for drop down selection id)</p>
  
  <pre><code>public partial class Product
  {
  
      public int SelectedId { get; set; }
  }
  </code></pre>
  
  <p>The view is</p>
  
  <pre><code>@model IQueryable&lt;Entity.Product&gt;
  
  
  @Html.DropDownListFor(.....)
  </code></pre>
  
  <p>What I do not understand how to fill up DropDownList with Products and if product selected bind Id to SelectedId property.</p>