Why use TagBuilder instead of StringBuilder?

后端 未结 6 1919
-上瘾入骨i
-上瘾入骨i 2020-12-13 18:04

what\'s the difference in using tag builder and string builder to create a table in a htmlhelper class, or using the HtmlTable?

aren\'t they generating the same thin

6条回答
  •  醉话见心
    2020-12-13 18:12

    Don't forget to do HTML encoding of values if you are using StringBuilder. I hope TagBuilder do this automatically.

提交回复
热议问题