开发者

ASP.NET MVC2 Dynamic HTML

开发者 https://www.devze.com 2022-12-10 13:37 出处:网络
I have a discussion forum/blog engine working with web forms. Each post contains html entered within an editor that is stored as an nvarchar in SQL server. When I display this in a view, lik开发者_开发

I have a discussion forum/blog engine working with web forms. Each post contains html entered within an editor that is stored as an nvarchar in SQL server. When I display this in a view, lik开发者_开发问答e so:

<%#Eval("body")%>

The eval function escapes the html, so I gt &lt, &gt, yada yada yada. Anyone know a good way around this?


Not sure it can help, but HtmlDecode is an option.

0

精彩评论

暂无评论...
验证码 换一张
取 消