how to get checked items from a checkedlistbox in c#
  • how to get list of checked items form checkedlistbox in c#
  • 2 Comments sorted by





  • _________________________________


     protected void CheckBoxList1_SelectedIndexChanged(object sender, EventArgs e)
        {
          
            foreach (ListItem li in CheckBoxList1.Items)
            {
                if (li.Selected)
                {             

                }
                else {
                    check = 1;
                }           
            }
         
        }
  • Just Use this code i Hope It will use Mr.Saeed

    private void checkedListBox1_ItemCheck(object sender, ItemCheckEventArgs e)
    {
    if (e.NewValue == CheckState.Checked)
    {
    listBox1.Items.Add(checkedListBox1.SelectedItem.ToString());
    }
    else
    {
    listBox1.Items.Remove(checkedListBox1.SelectedItem.ToString());
    }
    }

Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook

Popular Posts of the Week

Top Posters Weekly

Optimum Creative