Rendering no tables

  • Thread starter Thread starter Joseba Alonso
  • Start date Start date
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
 
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
 
Back
Top