protected void btnDelete_Click(object sender, EventArgs e) { foreach (GridViewRow row in GridView1.Rows) { if (row.RowType == DataControlRowType.DataRow) { CheckBox check1 = (CheckBox)row.FindControl("chkSelect"); if (check1.Checked == true) { var id = row.FindControl("LinkButton1") as LinkButton; objClass.ClassID = Convert.ToInt32(id.Text); objClass.UserID = 1; objClass.Delete(); GridviewDatabind(); } } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)