3Dave
3Dave

Reputation: 29041

ASP.NET MVC2 Dynamic HTML

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, like so:

<%#Eval("body")%>

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

Upvotes: 0

Views: 620

Answers (1)

Amirshk
Amirshk

Reputation: 8258

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

Upvotes: 3

Related Questions