foreach (RepeaterItem item in rpt1.Items)
{
if (item.ItemType == ListItemType.Item || item.ItemType == ListItemType.AlternatingItem)
{
CheckBox chk = (CheckBox)item.FindControl("chk_att");
HiddenField hf_id = (HiddenField)item.FindControl("hf_id");
if (chk.Checked == true)
{
st = "Update tbl_member set Status='Attended' where MemberID=" + hf_id.Value + "";
x = db.ExeQuery(st);
if (x > 0)
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "", "<script>alert('Atteneded')</script>", false);
fillrpt();
}
if (chk.Checked == false)
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "", "<script>alert('Not Atteneded')</script>", false);
}
}
but im getting error in foreach loop Collection was modified; enumeration operation may not execute.