In my asp.net project I use a modified Listbox control to show a multiple selection dropdownbox, which I present visually using Select2();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\]<select>\[/code\] option itself, ViewState doesn't recognize the item as selected.I suspect that if selecting an item with Select2() would alter the corresponding \[code\]<option>\[/code\] in the \[code\]<select>\[/code\], ViewState would pick up the change and mark it as selected when reloading the page.Aspx page:\[code\]<cc1:MultiSelector ID="txtUsers" runat="server" CssClass="select" multiple="multiple" OnSelectedIndexChanged="txtUsers_SelectedIndexChanged"></cc1:MultiSelector>\[/code\]Multiselector control:\[code\]public class MultiSelector : ListBox{ public IEnumerable SelectedItems { get { ListItemCollection items = this.Items as ListItemCollection; return this.Items.OfType().Where(item => item.Selected); } }}\[/code\]Code Behind:\[code\]protected void txtUsers_SelectedIndexChanged(object sender, EventArgs e){ // Do something with the selected items}\[/code\]Please advise on how I can set the corresponding HTML element as selected.\[code\]<option value='http://stackoverflow.com/questions/15800224/3' selected="selected">Item3</option>\[/code\]Also, removing an existing item doesn't work. Most likely for the same reason that the attribute selected is never removed.