c# - Jquery Chosen selected not working on asp listbox -


i using jquery chosen plugin on listbox multiple selection of items. when retrieving selected items, works, , number of selected items remains 0.

this how applying control:

<script type="text/javascript">      function pageload(sender, args) {             $('#<%= this.listbox.clientid%>').chosen();         } </script>  <asp:panel id="pnladdupdate" runat="server">   <asp:updatepanel id="updpaddupdate" runat="server" updatemode="conditional">      <asp:listbox id="listbox" runat="server" selectionmode="multiple"></asp:listbox>   </asp:updatepanel> </asp:panel> 

this codebehind:

foreach (listitem item in this.listbox)     {         if (item.selected)             list.add(convert.toint32(item.value));     } 

the list remains empty..any idea have missed?


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -