Writing a DIV tag?

A

Andrew Backer

Starting to mess with writing to the HtmlTextWriter, and have a
question about divs.

Why is it that HtmlTextWriterTag.Div writes a *table*, when I tell it
write a div? The tooltip help says "Specifies an HTML Div Element",
but the documentation on the tag says that it will write out a table?

Is there some *good* reason why MS doesn't want me to use a div? It
just seems reeee-diculus :)

- Andrew
 
A

Andrew Backer

I should have been a bit more liberal with info on what I am doing.
Sorry.

i'm just writing a normal webcontrol, and poking at methods on the
writer that gets past in to the RenderContents method :

override protected void RenderContents(HtmlTextWriter writer) {
... add attributes ...
writer.RenderBeginTag ( HtmlTextWriterTag.Div );
// writer.RenderBeginTag ( "div" );
writer.RenderEndTag();
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top