title: MVC multiselect selected values without model
body: <p>I have got a simple form and it has got a <code>MultiSelectList</code> inside. This form method is GET. When I choose more items in <code>SelectList</code> and submit form, I want to see what I choose. I use <code>SelectedValues</code> for that. But it selects only first item in <code>MultiSelectList</code>.</p>
  
  <p>My View :</p>
  
  <pre><code>&lt;form method="get"&gt;
      @Html.DropDownList("kategori", new MultiSelectList(ViewBag.KategoriSelect, "id", "isim", ViewBag.KategoriSelected),
   new
   {
       @multiple = "true ",
       @size = "8"
   })
  
      &lt;input type="submit" value="gönder" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>My Controller :</p>
  
  <pre><code>    public ActionResult Index(int[] kategori)
      {
          var db = new MyDbContext();
  
          var aracs = db.aracs.ToList();
  
          //items for multi select
          ViewBag.KategoriSelect = db.kategoris.ToList();
  
          //selected items
          ViewBag.KategoriSelected = kategori;
  
          return View(aracs);
      }
  </code></pre>
  
  <p>My Get URL : <code>http://localhost:6151/?kategori=2&amp;kategori=1&amp;kategori=4&amp;kategori=3</code></p>
  
  <p>HTML output :<br>
  <a href="https://i.stack.imgur.com/wPtOC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wPtOC.png" alt="Html Output for multi select"></a></p>
  
  <p>But it must select all item. what must I do for that ?</p>