Get the reference to the current page.

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

Syntax

C#
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
[BrowsableAttribute(false)]
public virtual PageReference CurrentPageLink { get; set; }

Field Value

A PageReference to the current page.

Remarks

Parses the query string / form parameters to get the page reference.

CurrentPageLink has no place inside templated controls, since the Container property is of the type PageTemplateContainer, which doesn't implement CurrentPageLink.

Examples

The following code example demonstrates the usage of CurrentPageLink to retrieve the PageData object.
CopyC#
PageData tmpPageData = GetPage(CurrentPageLink);

See Also