Try our conversational search powered by Generative AI!

Get Page Content



How to get the pagecontent of one page in another page in Episerver cms 6.

Oct 28, 2010 12:31

Use this, where 999 is the page ID you want to retrieve:

EPiServer.Core.PageData otherPage = this.GetPage(new EPiServer.Core.PageReference(999);
Oct 28, 2010 13:03


Thanks for the reply,

Is this will give all the property in page.In my page i have Name,Image,Ingress and link and want all these to be display in  other page.

Oct 28, 2010 14:44

You can use the following syntax to get access to the individual property values:




Oct 28, 2010 16:48

Another way is to use the EPiServer property control and set it's PageLink property to have it read from another page:

<EPiServer:Property runat="server" ID="ctlImageProperty" PropertyName="Image" PageLink="3" />

You can even make it read what source page to use from a property of the current page:

<EPiServer:Property runat="server" ID="ctlImageProperty" PropertyName="Image" PageLinkProperty="ImagePageLink" />

where ImagePageLink is a property of the Current Page of type Page which points to the page where the Image property is stored.

You can of course set these things from codebehind aswell:

override void OnLoad(EventArgs e)
PageReference sourcePage = GetReferenceToPageContainingImage(); // Performs whatever logic you want
ctlImageProperty.PageLink = sourcePage;


Oct 28, 2010 20:51


Thanks for the reply

I have a A page have 3 subpages and want to display the properties of three subpages in my A page,

EPiServer.Core.PageData otherPage = this.GetPage(new EPiServer.Core.PageReference(21));,


I have to write it for all the subpages which hardcoded id. Is there is any mothod  called getchildren by which i get all the properties of children pages

How do I map all the pages property in my A page?

Oct 29, 2010 7:51


I would suggest taking a look at

Use the search for see the different getchildren methods. But all of them returns page data objects, but from them you can get the properties.

Oct 29, 2010 8:03

Yes, DO read the SDK. In this special case though I would once again recommend using one of the EPiServer WebControls: The PageList. When you use Property controls inside the PageList they get their CurrentPage object from the current context - in the standard setup the child pages:

<EPiServer:PageList runat="server" PageLink="3">
<EPiServer:Property runat="server" PropertyName="Image" />

this will render the Image properties from all child pages of page 3.

Oct 29, 2010 9:37


thanks for the reply.I got the sub pages content in my aspx code, using df.GetDescendents method, and added them in the list of pagadata. Now to  get them  visible in my page which episerver property i use and how???

Oct 29, 2010 10:31

You can feed your PageDataCollection to the PageList by setting it's DataSource property from codebehind instead of setting the PageLink property as in earlier post.

Oct 29, 2010 17:03
* 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.