stankstank
asked on
Looping through controls
I am trying to loop through all checkboxes in my webpage - they are located inside of a multiview control of ASP.NET 2.0. This is the code I am using, but it does not work:
foreach (Control ctl in MultiView1.Controls[1].Con trols)
{
if (ctl is CheckBox)
{
CheckBox ch = (CheckBox)ctl;
Response.Write(ch.Text + " ");
}
}
Any ideas? I can't get it to work. :(
Thank you
foreach (Control ctl in MultiView1.Controls[1].Con
{
if (ctl is CheckBox)
{
CheckBox ch = (CheckBox)ctl;
Response.Write(ch.Text + " ");
}
}
Any ideas? I can't get it to work. :(
Thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.