public override HtmlControl GenerateNavbar() { PkCustomControl Li = PkCustomControl.ListItem("nav-item"); Li.AddControl(this); return(Li.GenerateNavbar()); }
public override HtmlControl Generate() { PkCustomControl Li = PkCustomControl.ListItem("nav-item dropdown"); HtmlButton DropdownButton = GenerateButton(StyleStr); DropdownButton.InnerText = Text; DropdownButton.Attributes["type"] = "button"; DropdownButton.Attributes["data-toggle"] = "dropdown"; DropdownButton.Attributes["aria-haspopup"] = "true"; DropdownButton.Attributes["aria-expanded"] = "false"; Li.AddControl(DropdownButton); HtmlGenericControl Div = GenerateDiv("dropdown-menu"); foreach (var C in Controls) { Div.Controls.Add(C.Generate()); } Li.AddControl(Div); return(Li.Generate()); }