BootstrapExtensions.Base.HtmlListBuilder.Link C# (CSharp) Метод

Link() публичный Метод

public Link ( string text, string url, object htmlAttributes, string identifier = null ) : HtmlListItem
text string
url string
htmlAttributes object
identifier string
Результат HtmlListItem
        public HtmlListItem Link(string text, string url, object htmlAttributes, string identifier = null)
        {
            var attrs = new HtmlAttributes(htmlAttributes);
            var link = new HtmlListItem(string.Format("<a href=\"{0}\" {2}>{1}</a>", url, text, attrs));
            var currActive = _list.HtmlAttributes["data-activeLink"];
            if (!string.IsNullOrEmpty(identifier) && currActive == identifier) link.Active();
            _list.ListItems.Add(link);
            return link;
        }

Same methods

HtmlListBuilder::Link ( string text, string url, string identifier = null ) : HtmlListItem