Click here to Skip to main content
15,907,326 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have use jquery plugin
http://harvesthq.github.io/chosen/[^]


in Gridview on DropDownlist

now i want to get those item which are multiple selected

C#
foreach (ListItem item in drop.Items)
           {

               if (item.Selected)
               {


                   Item += "," + item.Value;
               }
           }


but this loop always gives me 1st value which is selected

please help to get all values
Posted
Comments
Maarten Kools 29-Jul-13 9:16am    
If you're using the System.Web.UI.WebControls.DropDownList control you cannot have multiple select. If you want to support multiple selection, use the System.Web.UI.WebControls.CheckBoxList or System.Web.UI.WebControls.ListBox control.
Member-515487 29-Jul-13 9:50am    
same problem it give same it select 1st item only

1 solution

I forgot to selection Mode propery
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900