what is the meaning of following code ?
can any one explain me meaning of this code please..........
protected void btnSubmit_Click(object sender, EventArgs e)
{
string strSelectedItems = string.Empty;
foreach (var ctrl in Panel1.Controls)
{
if (ctrl is CheckBox)
{
CheckBox chk = (CheckBox)ctrl;
if (chk.Checked == true)
{
strSelectedItems += chk.Text + ",";
}
}
}
strSelectedItems = strSelectedItems.Remove(strSelectedItems.Length - 1, 1);
Label1.Text = "Selected Options Are : " + strSelectedItems;
}
Thanks