SharePoint Client Object Model: Read MultiLineText as Plain Text

While working with SharePoint Client Object Model there might be a need to retrieve value of a multiline rich text as “plain text. Let’s show you how


static void Main(string[] args)
{
string siteUrl = "http://yoursiteUrl";

ClientContext clientContext = new ClientContext(siteUrl);
var web = clientContext.Web;
var list = web.Lists.GetByTitle("MyList");

var itemId = "1";
var listItem = list.GetItemById(itemId);

//load listitem values as text
var itemFieldValues = listItem.FieldValuesAsText;

clientContext.Load(itemFieldValues);
clientContext.ExecuteQuery();

//retrieve the multiline field value as text
string multitextValue = itemFieldValues["MyMultiLineTextField"];

}

How to get list of sub sites using SharePoint client object model

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint.Client;
using Microsoft.SharePoint.Client.Utilities;

private static void GetAllSubSites()
{
ClientContext clientContext = new ClientContext(“http://{yoursiteurl}/“);
Web oWebsite = clientContext.Web;
clientContext.Load(oWebsite,
website => website.Webs,
website => website.Title
);
clientContext.ExecuteQuery();
Console.WriteLine(“Available sites Count: ” + oWebsite.Webs.Count);
for (int i = 0; i != oWebsite.Webs.Count; i++)
{
Console.WriteLine(“Site Title: “+ oWebsite.Webs[i].Title);
}
}

SharePoint Client Object Model Redistributable Released

Microsoft has released the SharePoint Foundation 2010 Client Object Model Redistributable. The assemblies for the .NET and Silverlight versions  of the SharePoint client object model are included. 
Microsoft.SharePoint.Client.dll
Microsoft.SharePoint.Client.Runtime.dll
Microsoft.SharePoint.Client.Silverlight.dll
Microsoft.SharePoint.Client.Silverlight.Runtime.dll
The assemblies for the .NET version must be included when you distribute solutions that target them. SharePoint client assemblies obtained in other ways cannot be legally redistributed.
Read more: