Is it possible for me to change both the properties & the HTML of a content editor web part on a publishing page using SharePoint 2010's web services? If so, would you mind pointing me in the right direction?


2 Answers 2


Yes you can.

The contents of a Content Editor Web Part (CEWP) are stored like any other web part - in the web part properties.

You can see this if you Export the web parts .dwp file and open in a text editor, you will get something like

<?xml version="1.0" encoding="utf-8"?>
<WebPart xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/WebPart/v2">
  <Title>Content Editor</Title>
 <Content xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor">
  <PartStorage xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor" />

The contents are in the Content element. (testing...testing...)

You can read and write the web part properties using the WebPartPagesWebService - see GetWebPart and SaveWebPart


Actually YES (thanks Ryan)!


  • 1
    Actually you can - see WebPartPagesWebService.SaveWebPart
    – Ryan
    Apr 25, 2012 at 13:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.