I think uve got a point, the only reason that I didnt consider using a reapeater was because I am outputting the checkboxes into a column in a table.
Ive tried the following as an example, but i dont think ive got it quite right yet. I dont get any values for ch.ID in the
Code:
CheckBox cbx = (CheckBox)ch.FindControl(ch.ID);
line of code. Any ideas? Am I on the right lines?
Code:
Repeater repeater = new Repeater();
ArrayList details = new ArrayList();
details.Add("2");
repeater.DataSource = details;
repeater.DataBind();
foreach (RepeaterItem ch in repeater.Items)
{
CheckBox cbx = (CheckBox)ch.FindControl(ch.ID);
if (cbx.Checked)
{
}
}
Bookmarks