Set PageData.Created or PageData.StartPublish from the code

Hi I'm creating a page from the code, and i would like to set PageData.Created or PageData.StartPublish, but they are both read only. Here's a code example: PageData objPage = Global.EPDataFactory.GetDefaultPageData(objageReference, "My page type name", EPiServer.Security.AccessControlList.NoAccess); objPage.PageName = "My page name"; objNewPage.StartPublish = dtmStartPublish; //<-- cant do this, it's read only!, episerver.dataaccess.saveaction.publish,;> I'm sure there's a simple way of doing this that somone here can point out to me. Thanks in advance! /Fredrik
Nov 25, 2005 10:53
Since all properties is also in the Property Collection you can set them there. objPage.Property["PageStartPublish"] = DateTime.Now.AddDay(1); /HAXEN
Nov 25, 2005 14:13
Just what i was looking for, thanks! objPage.Created = objDate; //<- Nope objPage["PageCreated"] = objDate; //<- Yup! /Fredrik
Nov 25, 2005 15:00
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.