title: MVC @Html.DropDownList - Default Value
body: <p>I have a list which I created in the controller:</p>
  
  <pre><code>    var PayList = new[] {  
                    new ListEntry { Id = 1, Name = "" },       
                    new ListEntry { Id = 2, Name = "Yes" },         
                    new ListEntry { Id = 3, Name = "No" }          
  
                  };
  
      ViewBag.PayList = new SelectList(PayList, "Id", "Name",2); 
  </code></pre>
  
  <p>In the View I have the following:</p>
  
  <pre><code>    @Html.DropDownList("Pay", ViewBag.PayList as SelectList) 
  </code></pre>
  
  <p>I was expecting the above to default to Yes but did not happen(Note that I am passing 2 in the ViewBag.PayList. </p>