//Drag and drop a panal control in asp.net web page//Following will be the auto generated code with user defind controlNameprotected System.Web.UI.WebControls.Panel PnlTimeExpence;//Decleare one checkbox objectCheckBox chkList1;//write a code to add dyanamic checkboxes.... .. //code to add dyanamic controls(checkboxes). Check link above for adding dynamic checkboxes.....//Now we have a Panel control ready with multiple checkboxes.//Fuction to select\Deselect checkboxes private void SelectAllCheckBoxControls(Control parent,bool checkedVal) { try { string strLeave=string.Empty; foreach (Control child in parent.Controls) { if (child.GetType().ToString().Equals("System.Web.UI.WebControls.CheckBox")) { CheckBox chk = (CheckBox)child; chk.Checked=checkedVal; } } } catch(Exception exp) { throw new Exception("SelectAllCheckBoxControls " + exp.Message); } } //Generate event on which we want to perform the select\deselect operation //Following code is using a checkbox control to select \deselect the Event private void chkReport_CheckedChanged(object sender, System.EventArgs e) { try { //Calling a userdefind function SelectAllCheckBoxControls(PnlTimeExpence,chkReport.Checked); } catch(Exception exp) { throw new Exception("chkReport_CheckedChanged " + exp.Message); } }