i have a content page named userhome.aspx. This page contains 4 checkbox.now i want to know which checkbox are selected. For this i used the following code.
foreach (Control ct in page.Controls)
{
for (int i = 0; i < ct.Controls.Count; i++)
{
Control c2 = ct.Controls[i];
if (c2 is CheckBox)
{
// code.......
}
}
}
But when i Debugging this code it loop through the master page controls.so it does not execute the //code section in the above.
How to solve this ?how to access the content page controls.
Advanced Thanks and Regards..