I want to have a button that once clicked, it will select all checkboxes in my checklistbox. I\'ve search the possible answers but I always see examples for asp.net and javascri
Try this:
foreach(Control c in this.Controls) { if (c.GetType() == typeof(CheckBox)) { ((CheckBox)c).Checked = true; } }