Esempio n. 1
0
        public void HiddenInputTag_does_not_output_name_attribute_for_unnamed_components()
        {
            var renderer = new DropDownListHtmlBuilder(new EditorDropDown("FontFace", new List <DropDownItem>()
            {
                new DropDownItem {
                    Text = "Arial", Value = "Arial,Verdana,sans-serif"
                }
            }));

            IHtmlNode tag = renderer.HiddenInputTag();

            Assert.False(tag.Attributes().ContainsKey("name"));
        }
        protected override IHtmlNode BuildCore()
        {
            var li = new HtmlElement("li")
                    .AddClass("t-editor-dropdown");

            var builder = new DropDownListHtmlBuilder(dropDown);

            IHtmlNode rootTag = builder.Build();

            rootTag.AppendTo(li);

            return li;
        }
        protected override IHtmlNode BuildCore()
        {
            var li = new HtmlElement("li")
                     .AddClass("t-editor-dropdown");

            var builder = new DropDownListHtmlBuilder(dropDown);

            IHtmlNode rootTag = builder.Build();

            rootTag.AppendTo(li);

            return(li);
        }
        protected override IHtmlNode BuildCore()
        {
            var li = new HtmlTag("li")
                    .AddClass("t-editor-dropdown");

            var builder = new DropDownListHtmlBuilder(dropDown);

            IHtmlNode rootTag = builder.Build();

            builder.InnerContentTag().AppendTo(rootTag);
            builder.HiddenInputTag().AppendTo(rootTag);

            rootTag.AppendTo(li);

            return li;
        }
Esempio n. 5
0
 public DropDownListHtmlBuilderTests()
 {
     dropDownList      = DropDownListTestHelper.CreateDropDownList();
     renderer          = new DropDownListHtmlBuilder(dropDownList);
     dropDownList.Name = "DropDownList1";
 }
 public DropDownListHtmlBuilderTests()
 {
     dropDownList = DropDownListTestHelper.CreateDropDownList();
     renderer = new DropDownListHtmlBuilder(dropDownList);
     dropDownList.Name = "DropDownList1";
 }
        public void HiddenInputTag_does_not_output_name_attribute_for_unnamed_components()
        {
            var renderer = new DropDownListHtmlBuilder(new EditorDropDown("FontFace", new List<DropDownItem>() { new DropDownItem { Text = "Arial", Value = "Arial,Verdana,sans-serif" } } ));

            IHtmlNode tag = renderer.HiddenInputTag();

            Assert.False(tag.Attributes().ContainsKey("name"));
        }