protected void deactivateLinkButton_Click(object sender, EventArgs e) { try { LinkButton lnkBtn = (LinkButton)sender; GridViewRow row = (GridViewRow)lnkBtn.NamingContainer; AppMenuBLL appMenu = new AppMenuBLL(); appMenu.UpdateMenuActivation(menuListGridView.Rows[row.RowIndex].Cells[0].Text.ToString(), "False"); MyAlertBox("alert(\"Menu Deactivated Successfully.\"); window.location=\"/UI/AppMenu/AdminMenuList.aspx\""); } catch (Exception ex) { msgbox.Visible = true; msgTitleLabel.Text = "Exception!!!"; msgDetailLabel.Text = ex.Message; } }