Indicates if the PageReference references a specific version or may be used to load any available version.

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

Syntax

C#
public bool IsAnyVersion()

Return Value

true if [is any version]; otherwise, false.

Remarks

This method only returns true if the PageReference object was created via the [M:PageReference(System.Int32, System.Boolean)] is usually set via the [M:PageReference(System.Int32, System.Boolean)] constructor. Typically, that constructor is used when you want to load the latest version a page regardless if it's published or not. When a PageReference with IsAnyVersion is set to true is passed to GetPage(PageReference) the returned PageData object will be, in order of preference:
  1. The currently published version
  2. The latest saved version
If IsAnyVersion is set to true, any value assigned to WorkID will be ignored.

See Also