protected void GVAdmin_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "edit") { Response.Redirect("AdminSetup.aspx?AdminID=" + e.CommandArgument); } else if (e.CommandName == "delete") { int AdminID = Convert.ToInt32(e.CommandArgument); using (PTCLEntities db = new PTCLEntities()) { db.DeletePtclAdmin(AdminID); } FillAdmin(); } }