Home
Lars Krämer edited this page May 20, 2019
·
1 revision
the net-tag-builder project is a simple library to generate html code from a tag object
TagBuilder tb = new TagBuilder("h1");
tb.AddAttribute("id", "MainPageTitle");
tb.AddAttribute("class", "is--link text-center");
tb.AddInnerHtml("this is a title");
tb.AddInnerHtml(tbSmall.Render());
string html = tb.Render();
html contains code like this
<h1 id="MainPageTitle" class="is--link text-center">this is a title</h1>