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

I have an SPListItem. I have a field on the item of type SPFieldMultiLineText. How can update the value of that field?

share|improve this question
up vote 3 down vote accepted

You need to return the field value in HTML/Plain text format and update it. Here you go:

SPSite site = new SPSite("http://site")) 
         using (SPWeb web = site.OpenWeb()) 

           SPList list = web.Lists["YourList"]; 
           SPListItem item= list.GetItemById(1);
           SPFieldMultiLineText multilineField = item.Fields.GetField("YourColumn") as SPFieldMultiLineText;
           // Get the field value as HTML
           string htmltext= multilineField.GetFieldValueAsHtml(item["YourColumn"], item);

           //or Get the field as Text
           string normaltext= multilineField.GetFieldValueAsText(item["YourColumn"]); 

           //updating html field text
           htmltext+= "Hello I am being updated!";
           item["YourColumn"] = htmltext;
share|improve this answer

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.