Rendering no tables

J

Joseba Alonso

Hi all,

Im developing a custom user control that writes HTML like this:

<code>
writer.AddAttribute("class","menuItemactive");
writer.RenderBeginTag("div");
writer.Write(text);
writer.RenderEndTag();
</code>

But when this is rendered in a not IE browser, it turned to a old-style
table layout. I want my application rendering strict XHTML and no tables
without care of user agent. There is a way to avoid this behaviour and make
it render exactly what im telling it?

TIA
 
N

Natty Gur

Hi,

Create your HTML and append it to stringbuilder. this method will be
faster and you are the only one controlling HTML rendering (no MS code
that do it for you and change the output by the target browser).

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top