title: Listbox Binding from the Backend MVC2
body: <p>Here, the listbox is loaded sample Text.
  My Model.aspx will be </p>
  
  <pre><code> public class Employee
  {
      public string Id { get; set; }
      public string Name { get; set; }
  }
  
  public class MyViewModel
  {
      public string[] SelectedEmployeeIds { get; set; }
      public IEnumerable&lt;Employee&gt; Employees { get; set; }
  } 
  </code></pre>
  
  <p>HomeController.cs</p>
  
  <pre><code> public ActionResult About()
      {
          var model = new MyViewModel
          {
              Employees = Enumerable.Range(1, 5).Select(i =&gt; new Employee
           {
               Id = i.ToString(),
               Name = "employee " + i
           })
          };
        return View(model);
       }
  </code></pre>
  
  <p>About.aspx</p>
  
  <pre><code>&lt;%: Html.ListBoxFor(
      x =&gt; x.SelectedEmployeeIds, 
      new SelectList(Model.Employees, "Id", "Name") 
  ) %&gt;
  </code></pre>
  
  <p>The above code is working fine. I want to load the list box from the Backend (i.e Emp Table)...Where should i do that.</p>