Jul 7, 2011
Loop through checking all the Check boxes
private void button3_Click(object sender, EventArgs e)
{
Form1 frm = new Form1();
int i = 0;
foreach (Control ctrl in this.Controls)
{
if (ctrl is CheckBox)
{
((CheckBox)ctrl).Checked = true;
}
}
}
the out put is given below
when ever u click the button it will check all the check boxes in the form
Labels:
c#.net,
check boxes
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment