Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
セルが"max" を添え字としてR maxを表示する表をハードコーディングする。
TableCell c = new TableCell(); c.Text = "R<sub>max</sub>";
しかし、結果は R< sub >max< /sub > でレンダリングされます (空白なし - 申し訳ありませんが、この投稿でレンダリングを停止するための安っぽい取り回しです)
正しいテキスト、間違ったレンダリング。また、CSSを使ってフォントなどを制御したいです。
試す
c.Text = "R<sub>max</sub>"
アップデート:
string html = "R<sub>max</sub>"; html = System.Web.HttpUtility.HtmlDecode(html); Response.Write(html);