title: Asp Net MVC 5 process multi select search
body: <p>I am trying to figure out how I can send n selected options to the controller and return a view with those options.</p>
  
  <pre><code>public ViewResult SearchAndFilters(string sortOrder, string currentFilter, string searchString, int? page, ViewModel model)
  {
      //pagination things
  
      if (model.CountryFilter != null)
      {
          //person is the list that contains all the "people", and country is a string
          var countries = person.Where(m =&gt; model.CountryFilter.Contains(m.Country));
          myViewModel.person = countries.ToPagedList(pageNumber, pageSize);
      }
  
      return View("~/Views/Home/SearchAndFilters.cshtml", myViewModel);
  }
  </code></pre>
  
  <p>This code works if I send only one country name through <code>model.CountryFilter</code>  but if I send 2 or more it only processes one. What would I need to change in order to make my search return all the people that are from country A and B?</p>
  
  <p>This is my view:</p>
  
  <pre><code>@using (Html.BeginForm("SearchAndFilters", "Person", FormMethod.Get))
  {
      &lt;p&gt;
  
      @Html.DropDownListFor(m =&gt; m.CountryFilter, Model.CountryList, new { @class = "chosen", multiple = "multiple", style = "width: 250px;", data_placeholder = "Countries" })
  
      &lt;/p&gt;
  
      &lt;input type="submit" name="SearchLists" value="Search" /&gt; 
  }
  </code></pre>