protected void BtnRemove_Click(object sender, EventArgs e) { if (Cat.RemoveCategory(GridView2.SelectedRow.Cells[1].Text)) { lblaMsg.Text = "Category is Deleted Successfully"; } else { lblaMsg.Text = "Category Not Deleted"; } GridView2.DataBind(); BtnRemove.Enabled = false; BtnUpdate.Enabled = false; }