Exemple #1
0
 public Navbar BeginNavbar(HtmlHelper htmlHelper, string id = null, object htmlAttributes = null)
 {
     var tagBuilder = new TagBuilder("div");
     tagBuilder.MergeAttributes(new RouteValueDictionary(htmlAttributes));
     tagBuilder.AddCssClass("navbar navbar-default");
     htmlHelper.ViewContext.Writer.Write(tagBuilder.ToString(TagRenderMode.StartTag));
     tagBuilder.GenerateId("navbar");
     var navbar = new Navbar(htmlHelper.ViewContext);
     return navbar;
 }
        public Navbar BeginNavbar(HtmlHelper htmlHelper, string id = null, object htmlAttributes = null)
        {
            var tagBuilder = new TagBuilder("div");

            tagBuilder.MergeAttributes(new RouteValueDictionary(htmlAttributes));
            tagBuilder.AddCssClass("navbar navbar-default");
            htmlHelper.ViewContext.Writer.Write(tagBuilder.ToString(TagRenderMode.StartTag));
            tagBuilder.GenerateId("navbar");
            var navbar = new Navbar(htmlHelper.ViewContext);

            return(navbar);
        }