<p>I want to know how to set a Publishing page content through the code (MOSS 2007).<br>
This is how I've created the page:</p>

<pre><code>PublishingPage page = publishingWeb.GetPublishingPages().Add("MyPage.aspx", pageLayout);
SPFile pageFile = page.ListItem.File;
page.Title = "My Page";                    
page.Update();
</code></pre>

<p>But my attempts of setting it's content didn't work.</p>

I don't know if it's
ok
to answer my own question, but after reflecting Sharepoint's codebehind I was able to find a way to set the page's content:
```
```
string content = "Welcome to <strong>My Page</strong>";
page.ListItem[FieldId.PublishingPageContent] = content;
```
```