protected void btnSubmit_Click(object sender, EventArgs e) { try { mainmenu = new MainMenuBLL(); int menuID = Convert.ToInt32((gwMenuItems.SelectedRow.FindControl("lblMenuID") as Label).Text); if (mainmenu.UpdateMainMenu(menuID, txtEditItemname.Text, txtEPermalink.Text, chkEStatus.Checked)) { this.load_gwMenuItems(); } } catch (Exception ex) { this.AlertPageValid(true, ex.ToString(), alertPageValid, lblPageValid); } }