We have a list with Title and Data (multi line field)as columns.

The data field has got html text with all html tags.

When we retrieve and display this text on an page then the html tags can be seen.

We use code like:


Any idea?

1 Answer 1


Try this code :

var field = listItem.Fields.GetFieldByInternalName("Data");     
var htmlValue = field.GetValueAsHtml(listItem[field.Id]);
divValue.innerHTML = htmlValue;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.