title: I want to do a multiple selector with checkboxes in ASP.NET MVC it fetches the employee ID from a Sql database
body: <pre><code>&lt;label asp-for=&quot;EmployeeId&quot; class=&quot;control-label&quot;&gt;&lt;/label&gt;
                      @Html.DropDownListFor(m =&gt; m.EmployeeId, (SelectList)ViewBag.LineManager, &quot;Select&quot;,
                      new { @class = &quot;form-control&quot;, multiple = &quot;multiple&quot;})
                      @Html.ValidationMessageFor(model =&gt; model.EmployeeId, &quot;&quot;, new { @class = &quot;text-danger&quot; })
  
                  &lt;/div&gt;
  </code></pre>
  <p>'''''''''My Controller Looks Like this'''''''''' My controller handles the brings back the information i have on the datebase of which its all the names of the employees i have created</p>
  <p>string uri = &quot;Vfl&quot;;</p>
  <pre><code>        var searchValue = HttpContext.Request.Form[&quot;search[value]&quot;].FirstOrDefault();
  
          var start = Request.Form[&quot;start&quot;].FirstOrDefault();
  
          // Paging Length 10,20  
          var length = Request.Form[&quot;length&quot;].FirstOrDefault();
  
  
          int pageSize = length != null ? Convert.ToInt32(length) : 0;
          int skip = start != null ? Convert.ToInt32(start) : 0;
          int recordsTotal = 0;
  
          var response = _vflService.GetAll(uri, &quot;&quot;);
  
          foreach(var item in response)
          {
              item.EmployeeName = GetEmployeeName(item.ReponsiblePersonId);
          }
          //Search
          if (!string.IsNullOrEmpty(searchValue))
          {
              response = response.Where(m =&gt; m.EmployeeName.ToLower().Contains(searchValue.ToLower()) || (!string.IsNullOrEmpty(m.ImmediateCauseDescription) &amp;&amp; m.ImmediateCauseDescription.ToLower().Contains(searchValue.ToLower())));
          }
  
          recordsTotal = response.Count();
  
          //Paging   
          var data = response.Skip(skip).Take(pageSize).ToList();
  
          return Json(new { recordsFiltered = recordsTotal, recordsTotal = recordsTotal, data = data });
  </code></pre>