protected void Page_Load(object sender, EventArgs e) { if(!Page.IsPostBack) { RoleName = GetRoleName(); DashboardMenu menu = new DashboardMenu(RoleName); Elements = menu.Menus; } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { menuid = Convert.ToInt32(Request.QueryString["id"]); RoleName = GetRoleName(); DashboardMenu menu = new DashboardMenu(RoleName); MenuElement mainMenu= menu.GetMenu(menuid); submenus = menu.GetSubMenus(mainMenu); } }