Take the 2-minute tour ×

So I have the standard Content Editor Webpart (MSContentEditor.dwp). The title i can set via webPart.Title (MSDN).

I can't find any property where I would set the content editor's content.

I basically want to provision the webpart to a publishing page (done), set it's title so something (done) and set some default content for it (stuck on this one). Any help is appreciated.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted
ContentEditorWebPart wp = ....
wp.Content = "Your text here";


share|improve this answer
That was easy :-) –  moontear May 25 '11 at 9:22
add comment

Here you go :)

ContentEditorWebPart.Content Property

You might need to cast your WebPart to ContentEditorWebPart if you can't see this property.

share|improve this answer
add comment

Your Answer


