protected void grid_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Delete") { OfferService.DeleteOfferList(Convert.ToInt32(e.CommandArgument)); } if (e.CommandName == "AddOfferList") { OfferService.AddOfferList(((TextBox)grid.FooterRow.FindControl("txtNewName")).Text); grid.ShowFooter = false; } if (e.CommandName == "CancelAdd") { grid.ShowFooter = false; } }