Exemplo n.º 1
0
        private static IHtmlContent BooleanTemplateDropDownList(bool?value)
        {
            var selectTag = new TagBuilder("select");

            selectTag.AddCssClass("list-box");
            selectTag.AddCssClass("tri-state");
            selectTag.Attributes["disabled"] = "disabled";

            foreach (var item in TriStateValues(value))
            {
                selectTag.InnerHtml.AppendHtml(DefaultHtmlGenerator.GenerateOption(item, item.Text));
            }

            return(selectTag);
        }