protected void grdModalMembers_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
con.Open();
int index = Convert.ToInt32(e.RowIndex);
index = 0;
GridViewRow selectedRow = grdModalMembers.Rows[index];
string MembershipCd = selectedRow.Cells[2].Text; //assuming your ID is the first column of your grid
SqlCommand sq = new SqlCommand("Delete from MembershipMast where FirstName='" + MembershipCd + "'", con);
sq.ExecuteNonQuery();
Response.Write("Deleted");
}
please solve my problem thanks