HtmlString vs. MvcHtmlString

前端 未结 3 590
陌清茗
陌清茗 2020-11-29 03:57

HtmlString vs. MvcHtmlString

What are the differences bettween those two, or when to prefer one over the other?

Edit:

3条回答
  •  醉话见心
    2020-11-29 04:29

    HtmlString was only introduced in .Net 4.0.

    In ASP.Net 3.5 MVC 2.0, you should use MvcHtmlString.
    In .Net 4.0, you should use HtmlString. (which is simpler)

提交回复
热议问题