SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When accessing a multi line text field from a SharePoint item in a list, what is the text type returned?

Using C#:


Is the above plaintext or html or...?

I want to format the text to be put in a HTML email ultimately, but all formatting of the string in the actual description is lost when doing so.

share|improve this question
What option did you choose? Rich text or Enhanced rich text? Usually you get html formatted text all the time if you choose rich text for multi line text column – Diptarag Dec 20 '12 at 6:18
I believe enhanced rich text. There were some benefits to it in terms of the WYSIWYG editing. I forget what those were now. – cbrad Dec 20 '12 at 16:16
up vote 2 down vote accepted

You may have to change the description column using Powershell to include HTML.

$Web = Get-SPWeb ""
$Field = $web.Fields | ?{$_.staticname -eq "MyCustomColumn"}
$Field.RichText = $True
$Field.RichTextMode = "FullHtml"


EDIT: Try this:

SPFieldMultiLineText multilineField = item.Fields.GetField(COLUMN_NAME) as SPFieldMultiLineText;

 if (multilineField != null)
 // Get the field value as HTML
 string text = multilineField.GetFieldValueAsHtml(item[COLUMN_NAME], item);


share|improve this answer
Hmm, it looks like this just changes the text fields to rich text, which allows HTML etc. I do already have my fields set up as rich text with HTML enabled. I'm just wondering when you pull data from fields programmatically, how those strings are formatted. – cbrad Dec 19 '12 at 23:05
I updated my answer. – Mike Dec 20 '12 at 14:30
That looks like it will work I'll give it a try, thanks. You also updated your gravatar! – cbrad Dec 20 '12 at 16:13
Why yes, yes I did. Let me know if that works for you! – Mike Dec 20 '12 at 18:42
Works perfectly, accepted as answer. Thanks! – cbrad Dec 20 '12 at 19:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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