Пример #1
0
        protected override void WriteHtmlTo(HtmlTextWriter writer)
        {
            var ul = new HtmlElement("ul");

            ul.MergeAttributes(HtmlAttributes);

            foreach (var current in Items)
            {
                CreateMenuNode(current).AppendTo(ul);
            }

            ul.WriteTo(writer);
        }
Пример #2
0
        protected override void WriteHtmlTo(HtmlTextWriter writer)
        {
            var ul = new HtmlElement("ul");

            ul.MergeAttributes(HtmlAttributes);

            for (var current = System.Web.SiteMap.CurrentNode; current != null; current = current.ParentNode)
            {
                CreateBreadcrumpNode(current, element => false).PrependTo(ul);
            }

            CreateBreadcrumpNode(LastNode(), element => true).AppendTo(ul);

            ul.WriteTo(writer);
        }