Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
int intRefId = 123; // id to parent
PageReference prParent = new PageReference(intRefId);
PageData pdNewEpiPage = null;
pdNewEpiPage = EPiServer.DataFactory.Instance.GetDefaultPageData(prParent, "MyPageTypeName", EPiServer.Security.AccessLevel.NoAccess);
pdNewEpiPage.PageName = "My Instance Name";
pdNewEpiPage.SetValue("Prop1", "My Prop1 Value");
pdNewEpiPage.SetValue("Prop2", "My Prop2 Value");
PageReference prNewEpiPage = EPiServer.DataFactory.Instance.Save(pdNewEpiPage, EPiServer.DataAccess.SaveAction.Publish, EPiServer.Security.AccessLevel.NoAccess);
int intNewId = prNewEpiPage.ID;
// Done !
Maybe this is not what you asked, please comment if so !