1

I am trying to edit an existing page with this code. When I am setting a publishComment it is throwing this exception.

item["Title"] = pageTitle;
item["PublishingPageContent"] = pageContent;
item.Update();
SharePointTools.ClientContext.ExecuteQuery();
item.File.Publish(publishComment);
SharePointTools.ClientContext.ExecuteQuery();

What am I doing wrong? I need your help guys.

  • Are you sure that none of the objects (pageTitle, pageContent, publishComment) is null? – pholpar Aug 18 '16 at 12:27
  • yes all has a value – Doniyor Niyozov Aug 19 '16 at 8:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.