Exemplo n.º 1
0
        private void CreateSiteMapNodes()
        {
            MenuList menuList = new MenuList();
            menuList.GetAll();

            AddNode(new SiteMapNode(this, "AboutUs", "~/AboutUs.aspx", "About Us", "About Us"), _siteMapRoot);

            SiteMapNode nodeMenu = new SiteMapNode(this, "Menu", "~/Menu.aspx", "Menu", "Menu");
            menuList.ForEach(subMenu =>
                {
                    SiteMapNode node = new SiteMapNode(this, subMenu.Title, "~/Menu.aspx?Sub=" + subMenu.ID.ToString(), subMenu.Title, subMenu.Title);
                    AddNode(node, nodeMenu);
                });

            AddNode(nodeMenu, _siteMapRoot);
            AddNode(new SiteMapNode(this, "ContactUs", "~/ContactUs.aspx", "Contact Us", "Contact Us"), _siteMapRoot);
        }