DataFactoryService and Categories

Vote:
 
Hello! I'm exporting pages from another system to EPiServer 4.50 with the help of the DataFactoryService. Everything is working fine until we decided that the pages(news) is going to be categorised. The code below is an example how I add some text to "MainBody" before I save the page. Is there a way to add categories in the same way? It seems like the rawProperty has to be a string value or have I missed something? PageReference pageRef = new PageReference(); pageRef.ID = ParentPageID; RawPage raw = DataFactoryService.GetDefaultPageData(pageRef, PageTypeID); RawProperty rawProperty = rawPage.Property[GetPropertyIndex(rawPage, "MainBody")]; rawProperty.Value = "String with text"; rawProperty.IsModified = true; rawProperty.IsNull = false; DataFactoryService.Save(raw, SaveAction.Publish)
#13006
Mar 25, 2008 18:35
* 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.