protected void GV_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "delete") { int ComplaintID = Convert.ToInt32(e.CommandArgument); Response.Write(ComplaintID); using (PTCLEntities db = new PTCLEntities()) { db.DeleteComplaint(ComplaintID); } PendingGridView(); } }