title: How to select multiple items from dropdown list, save it and again repopulate the dropdown with the selected list?
body: <p>I am working on an ASP.NET MVC3 project. I am facing issues regarding multiple selection in dropdown.</p>
  
  <p>The problem is, I have to save multiple items in database from a dropdown list and repopulate it.</p>
  
  <p>I have used the class below to represent each list data:</p>
  
  <pre><code>public class IDNameValueTO {
      public int ID { get; set; } //Value of the selection Element
      public string Name { get; set; } //Name of the selectionElement
      public int Value { get; set; } //1 if value is checked and 0 if not
  }
  </code></pre>
  
  <p>My List goes as follows:</p>
  
  <pre><code>public List&lt;IDNameValueTO&gt; tempList = new List&lt;IDNameValueTO&gt;();
  ViewBag.SelectedList = tempList;
  </code></pre>
  
  <p>I am generating the dropdown list as follows:</p>
  
  <pre><code>@Html.DropDownList("SelectedValue", new SelectList(ViewBag.SelectedList, "ID", "Name"))
  </code></pre>
  
  <p>Now how do I save the multiple selection and display it later on using dropdown?</p>