2014-09-30

Often after building a website, I am required to change the title.  Here is an example of how to update the Title and Description of a website using CSOM.

string siteUrl = "http://MyServer/sites/MySiteCollection";

//Costruttore 
using (ClientContext clientContext = new ClientContext(siteUrl))
{
          //change title and description of siteUrl 
           Web website = clientContext.Web;

           website.Title = "New Title";
           website.Description = "New Description.";

           website.Update();

           clientContext.ExecuteQuery();
}

 

About the author 

Gerardo Nacchia