protected void GetMenuGroupList() { AppMenuBLL appMenu = new AppMenuBLL(); try { DataTable dt = appMenu.GetMenuGroupList(); menuGroupListGridView.DataSource = dt; menuGroupListGridView.DataBind(); if (menuGroupListGridView.Rows.Count > 0) { menuGroupListGridView.UseAccessibleHeader = true; menuGroupListGridView.HeaderRow.TableSection = TableRowSection.TableHeader; } if (dt.Rows.Count < 1) { msgbox.Visible = true; msgTitleLabel.Text = "Data Not Found!!!"; msgDetailLabel.Text = ""; } } catch (Exception ex) { msgbox.Visible = true; msgTitleLabel.Text = "Exception!!!"; msgDetailLabel.Text = ex.Message; } finally { appMenu = null; } }