title: How to get multiselected Dropdownlist values in asp.net mvc
body: <p>I have a problem to get multi select dropdown list values.can anyone suggest me how to get select multiple dropdownlist values as well as how to get them in controller.</p>
  
  <p>My code is like this:-</p>
  
  <p><strong>Model</strong></p>
  
  <pre><code>public string BusinessUnitSiteSafetyRepresentative { get; set; }
  </code></pre>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>[HttpPost]
  public ActionResult AddClientBusinessUnitSite(LocalAddClientBusinessUnitSite local)
  {
   var query = from o in entitydb.systemusersorganizations.toList()
               from c in entitydb.contacts.toList()
               where o.orgId == clientId 
               select new SelectListItem
               {
                  Text = c. Name;
                  Value = c.OrgId.toString()                 
               }
   ViewBag.list1 = query.ToList();
  }
  </code></pre>
  
  <p>Well, I can get if single value is selected &amp; can save to DB.But how to select multiple values as well as to get them in Controller so as to save them.</p>
  
  <p>Note: - I am retrieving the dropdownlist values from DB as shown above.</p>
  
  <p><strong>View</strong></p>
  
  <pre><code>@Html.ListBoxFor(x =&gt; Model.BusinessUnitSiteSafetyRepresentative,new 
   MultiSelectList((IEnumerable&lt;SelectListItem&gt;)@Viewbag.list1) 
  </code></pre>
  
  <p>I have gone through some examples but none of them helped me.Please help me.</p>