string field = ViewState["Field"].ToString();
DataTable dt = (DataTable)Session["Academic"];
foreach (DataRow dr in dt.Rows)
{
if (dr["Degree"].ToString() == field)
{
dr.Delete();
dt.AcceptChanges();
}
}
Session["Academic"] = dt;
gdvwAcademic1.DataSource = Session["Academic"] as DataTable;
gdvwAcademic1.DataBind();
when this code executed raise error as "collection was modified enumeration operation might not execute." why this so..?