title: Multi-select CheckBoxList in ASP.NET MVC 5
body: <p>My issue today revolves around implementing a checkboxlist and getting the item selected in MVC 5. Here's the issue i am having:</p>
  
  <pre><code>EmployeeViewModel viewModel = new EmployeeViewModel { data =  
  manager.getEmployeeData() };
  return View(viewModel);
  </code></pre>
  
  <p>I have a dropdownlist in my Main View and in order to populate it with the data from the array, i created a View Model, which then gets sent into the view, as shown below:</p>
  
  <pre><code>Public class EmployeeViewModel {
      public MyEmployees[] data {get; set;};
  }
  </code></pre>
  
  <p>The issue is, unfortunately, the data array does not have a boolean isSelected property but has properties like employeeName and Id. So ultimately, my question is, how would i implement a checkbox list which allows for multiple selections AND to select all employees as well as allowing me to know which employee got selected or was not selected. I cannot use bootstrap or anything like that so have to implement it using HTML helpers or C#/ASP.NET etc. Thanks for all the help.</p>
  
  <p>Edit: Sorry for not making this clear earlier, i want this checkbox list to appear within a dropdownlist. So basically, upon clicking the dropdown, you have items with checkboxes next to them.</p>