title: JQuery Select2 doesn't change the html option as selected
body: <p>In my asp.net project I use a modified Listbox control to show a multiple selection dropdownbox, which I present visually using Select2();</p>
  
  <p>I set AutoPostBack="True" so that after every action I can change an object in code behind. However because Select2 multple does not alter the <code>&lt;select&gt;</code> option itself, ViewState doesn't recognize the item as selected.</p>
  
  <p>I suspect that if selecting an item with Select2() would alter the corresponding <code>&lt;option&gt;</code> in the <code>&lt;select&gt;</code>, ViewState would pick up the change and mark it as selected when reloading the page.</p>
  
  <p><strong>Aspx page:</strong></p>
  
  <pre><code>&lt;cc1:MultiSelector ID="txtUsers" runat="server" CssClass="select" multiple="multiple"  OnSelectedIndexChanged="txtUsers_SelectedIndexChanged"&gt;&lt;/cc1:MultiSelector&gt;</code></pre>
  
  <p><strong>Multiselector control:</strong></p>
  
  <pre><code>public class MultiSelector : ListBox
  {
      public IEnumerable SelectedItems
      {
          get
          {
              ListItemCollection items = this.Items as ListItemCollection;
              return this.Items.OfType().Where(item => item.Selected);
          }
      }
  }</code></pre>
  
  <p><strong>Code Behind:</strong></p>
  
  <pre><code>protected void txtUsers_SelectedIndexChanged(object sender, EventArgs e)
  {
    // Do something with the selected items
  
  }</code></pre>
  
  <p>Please advise on how I can set the corresponding HTML element as selected.</p>
  
  <p><code>&lt;option value='3' selected="selected"&gt;Item3&lt;/option&gt;</code></p>
  
  <p>Also, removing an existing item doesn't work. Most likely for the same reason that the attribute selected is never removed.</p>