tags:

views:

14

answers:

1

Hi

I'm trying to introduce HTML5 into my apps , but I'm struggling to find a way to use HtmlTextWriter with a new tag.

Would anyone be able to tell me how I can render an <aside>or a <section> tag using HtmlTextWriter and WriteFullBeginTag?

I'm using webforms - C# or VB solution accepted.

Thanks in advance

Sniffer

A: 

Hello,

writer.AddAttribute("attribute-name", "value");
writer.RenderBeginTag("aside");

writer.RenderEndTag(); //aside

or

writer.WriteFullBeginTag("aside");

To write out the full tag with no attributes.

There is no enumeration support for it, but the writer gives you the ability to use strings to accomplish this...

Brian