foreach (Control ct in form1.Controls)
{
if (ct.GetType().ToString().Equals("System.Web.UI.WebControls.CheckBox"))
{
CheckBox cb = (CheckBox)ct;
if (cb.Checked == true)
{
Response.Write(cb.Text.ToString());
}
}
}
{
if (ct.GetType().ToString().Equals("System.Web.UI.WebControls.CheckBox"))
{
CheckBox cb = (CheckBox)ct;
if (cb.Checked == true)
{
Response.Write(cb.Text.ToString());
}
}
}