protected void saveButton_Click(object sender, EventArgs e) { AppMenuBLL appMenu = new AppMenuBLL(); try { if (groupWiseUserMenuListListBox.Items.Count > 0) { appMenu.UpdateMenuSorting(groupWiseUserMenuListListBox, parentMenuIdHiddenField.Value.Trim()); PopulateAllMenu(); MyAlertBox("alert(\"Menu Sorted Successfully.\");"); } } catch (Exception ex) { msgbox.Visible = true; msgTitleLabel.Text = "Exception!!!"; msgDetailLabel.Text = ex.Message; msgbox.Attributes.Add("Class", "alert alert-warning"); } finally { appMenu = null; } }