Aggregate comments from multiple line text-box with appended text into a single string

A simple code snippet to get the comments from multiple line text-box with appended text in SharePoint 2010 . For the multiple line text-box with appended text the versioning on the list needs to be enabled. The appended comments are stored as item version. Below is the code to aggregate the comments in a single text field.

allComments = "";
foreach (SPListItemVersion versionListItem in item.Versions)
	if (versionListItem["Comments"] != null){
		allComments += versionListItem["Comments"].ToString();




About Rupesh

.NET and SharePoint 2010 developer
This entry was posted in Misc and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s