MVC2: Is there an Html Helper for raw Html?

后端 未结 4 888
孤街浪徒
孤街浪徒 2021-01-13 13:43

Is there an Html helper that simply accepts and returns raw html? Rather than do something ugly like this:

<% if (Model.Results.Count > 0) { %>

        
4条回答
  •  南方客
    南方客 (楼主)
    2021-01-13 14:30

    For MVC2:

    <%: MvcHtmlString.Create("

    Results

    ") %>

    Found here:

    store and display html tags in MVC

提交回复
热议问题