How would you do to display rendered html code like this <b>short article</b> and display it as bold short articl
in an ASP.net mvc 3 view ?
I tried out @System.Web.HttpUtility.HtmlDecode(item.short_article); but doesn' t work
thanks
You can use HtmlHelper.Raw. It will return markup that is not HTML encoded.
You need to be aware however of the security risks when outputting HTML like this. If a user enters some HTML code that contains Javascript and save it to the database, your page will render and execute this script.
If there is a risk of users entering malicious data for your short_article field you should strip their input based on a whitelist of tags you want to allow.