title: Asp.Net MVC 2 Dropdown Displaying System.Web.MVC.SelectListItem
body: <p>I have a table that contains a list of EquipmentIDs and another table that has maintenance records.  </p>
  
  <p>When the user edits a maintenance record I want there to be a drop down list of all of the equipment IDs from the table.</p>
  
  <p>The dropdown list populates, and it populates with the correct amount of entries, however they all say <code>System.Web.MVC.SelectListItem</code> instead of the value of the ID.</p>
  
  <p>Here is the code that generates the list:</p>
  
  <pre><code>public ActionResult Edit(int id)
  {
      MaintPerformed maintPerformed = maintPerformedRepository.GetMaintPerformed(id);
  
      IList&lt;EquipmentID&gt; IDs = equipmentIDRepository.GetEquipmentIDAsList();
  
      IEnumerable&lt;SelectListItem&gt; selectEquipList =  
          from c in IDs
          select new SelectListItem
          {
              //Selected = (c.EquipID == maintPerformed.EquipID),
              Text = c.EquipID,
              Value = c.Sort.ToString()
          };
  
      ViewData["EquipIDs"] = new SelectList(selectEquipList, maintPerformed.ID);
      return View(maintPerformed);
  }
  </code></pre>
  
  <p>Here is the entry in the .aspx page for the Dropdown list:</p>
  
  <pre><code>%: Html.DropDownList("EquipIDs") %&gt;
  </code></pre>
  
  <p>Here is how I am generating the list from the table:</p>
  
  <pre><code>public List&lt;EquipmentID&gt; GetEquipmentIDAsList()
      {
          return db.EquipmentIDs.ToList();
      }
  </code></pre>
  
  <p>It appears that everything is working correctly with the exception of assigning the text to be displayed in the drop down box.</p>
  
  <p>What am I missing or not thinking correctly about?</p>