Being of the type PageReference, PageLink is the unique page ID.

Namespace:  EPiServer.Core
Assembly:  EPiServer (in EPiServer.dll) Version: 5.2.375.236


public PageReference PageLink { get; set; }


The use of PageLink is derived from the way in which EPiServer is structured. Pages are nothing more than an instance of an EPiServer page type and a collection of property settings stored in the database. Individual pages are identified by the pkID column in the database table tblPage and transforming this into a URL, we get something looking like "templates/emailpagecontainer.aspx?id=n?", where "n" is the previously mentioned pkID and thus the unique page identifier.


The following example demonstrates the usage of PageLink in HTML.

As PageLink is guaranteed to be unique among all pages in a certain EPiServer instances, it is used in the following example to create unique IDs and names for HTML check boxes. The code is used to present the visitor with a selection of pages and allows them to select one or more for further processing.

<EPiServer:PageList SortBy="PageName" DataSource="<%#PropertySearchControl%>" runat="server" ID="PageListControl">
        <input type="checkbox" id="ViewUser<%#Container.CurrentPage.PageLink%>" name="ViewUser<%# Container.CurrentPage.PageLink %>" />

See Also