title: How can I get selected values in multi-select dropdownlist
body: <p>I have a page that uses the ASP.NET MVC razor engine with the following sample code for a multi-select dropdownlist</p>
  
  <pre><code>&lt;td&gt;
  @Html.DropDownList("ddlMyList", ViewBag.MyList as IDictionary&lt;string, IEnumerable&lt;SelectListItem&gt;&gt;, "[ALL]", new { @multiple = "multiple" })                    
  &lt;/td&gt;
  </code></pre>
  
  <p>My problem is how to get all the selected  values from the dropdownlist in the code below</p>
  
  <pre><code>    [HttpPost, ActionName("Index")]
      public ActionResult GenerateStandardReport(FormCollection frm)
          {
  
                  int mySelectedListItems;
                  string reportType = string.Empty;
                  string startDate = string.Empty;
                  string endDate = string.Empty;
  
                  //HOW CAN I GET A SINGLE OR ALL MULTIPLE VALUES SELECTED IN 
                  //DROPDOWNLIST HERE?
  
                  if (!string.IsNullOrEmpty(frm["reportType"]))
                  {
                      reportType = frm["reportType"];
                  }
                  if (!string.IsNullOrEmpty(frm["startDate"]))
                  {
                      startDate = frm["startDate"];
                  }
                  if (!string.IsNullOrEmpty(frm["endDate"]))
                  {
                      endDate = frm["endDate"];
                  }
  }
  </code></pre>