I am writing a custom web site migration routine to extract the contents of the div tags from one site and then create sitefinity pages dynamically using the PageManager API.
I've had success automating the ContentBlock PageControl. However, we have a few custom controls that style the content blocks in a special way. I am using the same technique as the ContentBlock control, however the page designer is rendering the control as "Object reference not set to an Instance of an object" in design mode. When I click on Edit to view the properties of this control, it looks fine and contains the properties that I set. When I try to navigate to the page that was created, it just bombs out with a site maintenance message.
Here is the snippet of code that I am using. Note, the code doesn't generate any errors, the page that was created programmatically does display an error:
var cphRelatedLinks = manager.CreateControl<PageControl>(
var pcContent = manager.CreateProperty();
This code is modeled after this code which works fine for ContentBlock:
var cphPrimaryContent = manager.CreateControl<PageControl>();
var pcHhtml = manager.CreateProperty();
I am developing this for a Fortune 500 company with a very limited time/budget for this particular project. A prompt reply is appreciated.