0

Hard-coding a table in which a cell displays Rmax with "max" as a subscript.

TableCell c = new TableCell();
c.Text = "R<sub>max</sub>";

But the result is rendered R< sub >max< /sub > (without the whitespaces - sorry, crappy get-round to stop it from rendering in this post)

Right text, wrong rendering. Also, I'd like to use CSS to control fonts etc.

Extermiknit
  • 153
  • 1
  • 2
  • 12

1 Answers1

0

Try

c.Text = "R<sub>max</sub>"

UPDATE:

string html = "R&lt;sub&gt;max&lt;/sub&gt;";
html = System.Web.HttpUtility.HtmlDecode(html);
Response.Write(html);
yogi
  • 19,175
  • 13
  • 62
  • 92