AI OnAI Off
var pageRef=(pd.Property.Get("PageX") as PropertyPageReference);
if (!PageReference.IsNullOrEmpty(pageRef.PageLink))
{
Data pd2 = EPiServer.DataFactory.Instance.GetPage(pageRef.PageLink);
Response.Redirect(pd2.LinkURL,true);
}
But you need to know that its not allowed to redirect from the firstpage based on host
How do I redirect to a certain page which is a subpage of startpage? I tried the follwing without any better luck:
PageData pd = EPiServer.DataFactory.Instance.GetPage(EPiServer.Core.PageReference.StartPage);
object thePage = pd.Property.Get("PageX");