I\'m using cshtml pages with webmatrix, i\'m trying to render the html that is stored in my db, but the output is like Lorem ipsum dolor sit amet, consectetur adi
The syntax with '@' automatically applies encoding of HTML sensitive characters. If your variables (or method call, etc.) returns a string that contains HTML markup and you want the browser to render that markup, wrap the string in a MvcHtmlString.
Any of these will work:
@Html.Raw(row.header)
@(new MvcHtmlString(row.header))
@MvcHtmlString.Create(row.header)
Note that this will expose the browser to ANY HTML markup contained in the values. This method should only be used if the data is verified to only contain safe markup, no scripts, etc.