public void create_and_return_a_link_as_a_child_of_another_tag()
 {
     var tag = new HtmlTag("div");
     var link = tag.ActionLink("click", "important", "invoke");
     link.ToString().ShouldEqual("<a href=\"#\" class=\"important invoke\">click</a>");
     tag.ToString().ShouldEqual("<div><a href=\"#\" class=\"important invoke\">click</a></div>");
 }
        public void create_and_return_a_link_as_a_child_of_another_tag()
        {
            var tag  = new HtmlTag("div");
            var link = tag.ActionLink("click", "important", "invoke");

            link.ToString().ShouldEqual("<a href=\"#\" class=\"important invoke\">click</a>");
            tag.ToString().ShouldEqual("<div><a href=\"#\" class=\"important invoke\">click</a></div>");
        }
Ejemplo n.º 3
0
        private HtmlTag buildTopNode()
        {
            HtmlTag tag        = new HtmlTag("table").Attr("cellPadding", "0").Attr("cellSpacing", "0").AddClass(GrammarConstants.GRAMMAR_SELECTOR).Hide();
            HtmlTag headerCell = tag.Add("thead/tr/td").AddClass(GrammarConstants.HEADER_CONTAINER);

            headerCell.Add("span").Text(_fixture.Policies.AddGrammarText);
            headerCell.Add("span").AddClass(GrammarConstants.SELECTION_REQUIRED).Text(GrammarConstants.REQUIRED).Render
                (_fixture.IsSingleSelection());

            headerCell.ActionLink(GrammarConstants.CLOSE, GrammarConstants.CLOSER).Render(!_fixture.IsSingleSelection());

            return(tag);
        }