Click here to Skip to main content
15,895,084 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,


how to display the checked items in checkboxlist
Posted

C#
void Check_Clicked(Object sender, EventArgs e)
      {
         Message.Text = "Selected Item(s):<br><br>";

         // Iterate through the Items collection of the CheckBoxList
         // control and display the selected items.
         for (int i=0; i<checkboxlist1.Items.Count; i++)
         {
            if (checkboxlist1.Items[i].Selected)
            {
               Message.Text += checkboxlist1.Items[i].Text + "<br>";

            }
         }
      }

Ref: CheckBoxList Class[^]
 
Share this answer
 
See this link also

http://www.dotnetcurry.com/ShowArticle.aspx?ID=77[^]

Thanks
--RA
 
Share this answer
 
Is Google broken at your place? It is much faster for looking at these 'How to' questions on Google[^].

I seached, and some of the very first links promising to me.

http://www.w3schools.com/aspnet/control_checkboxlist.asp[^]

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.checkboxlist.aspx[^]
 
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