I am trying to read some values from a SharePoint List and render them in my page as HTML. However, it literally shows the HTML tags on the Web Part page and fails to render it.
protected override void Render(System.Web.UI.HtmlTextWriter writer)
{
writer.WriteLine("<br />"); // this works
writer.WriteLine(htbl["key"].ToString()); // html fails to render. literally renders the HTML in the string
}
I have seen following approaches already:
- Text to HTML – the JavaScript mentioned seems to be overkill in my opinion. Is there no easier way to accomplish this?
Please advise.