Monday 20 May 2013

A Page Has Multiple Check Box How to Unchek all CheckBox At a time


 void Uncheck()
        {
            foreach (Control Chk in this.Controls)
            {
                if (Chk.GetType() == typeof(Panel))
                {
                    foreach (Control ct in ((Panel)Chk).Controls)
                    {
                        if (ct.GetType() == typeof(CheckBox))
                        {
                            ((CheckBox)ct).Checked = false;
                        }
                    }
                }
            }
        }

No comments:

Post a Comment