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

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

Syntax

C#
public PageReference PageLink { get; set; }

Remarks

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.

Examples

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.

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

See Also