November Happy Hour will be moved to Thursday December 5th.

Class ContentPageBase<TPage, TContent>

Base class for WebForms that renders routed IContent instances.

Inheritance
System.Object
ContentPageBase<TPage, TContent>
Namespace: EPiServer.Web
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7
Syntax
public class ContentPageBase<TPage, TContent> : PageBase, ICurrentPage, ISupportsScriptManager, IPageSource<TPage>, IPageSource, IContentSource<TContent>, IContentSource, IRenderTemplate<TContent>, IRenderTemplate where TPage : PageData where TContent : IContent
Type Parameters
Name Description
TPage

The type of the page.

TContent

The type of the content.

Constructors

ContentPageBase()

Initializes a new instance of the ContentPageBase<TPage, TContent> class.

Declaration
public ContentPageBase()

ContentPageBase(Int32)

Initializes a new instance of the ContentPageBase<TPage, TContent> class.

Declaration
public ContentPageBase(int options)
Parameters
Type Name Description
System.Int32 options

The page options to enable.

Remarks

The options parameter is a bitmap constructed from the OptionFlag of Page plugin classes from the EPiServer.Web.PageExtensions namespace.

ContentPageBase(Int32, Int32)

Initializes a new instance of the ContentPageBase<TPage, TContent> class.

Declaration
public ContentPageBase(int enable, int disable)
Parameters
Type Name Description
System.Int32 enable

The page options to enable.

System.Int32 disable

The page options to disable.

Remarks

The disable bitmap will override enabled options in case of conflicting options.

Properties

CurrentContent

Gets the content that was routed to for current request.

Declaration
public virtual TContent CurrentContent { get; }
Property Value
Type Description
TContent

The content of the current.

Remarks

The content can either have been routed to directly or through an partial router.

CurrentPage

Declaration
public virtual TPage CurrentPage { get; set; }
Property Value
Type Description
TPage

Explicit Interface Implementations

IContentSource.CurrentContent

Gets the content that was routed to for current request.

Declaration
IContent IContentSource.CurrentContent { get; }
Returns
Type Description
IContent

The content of the current.

Remarks

The content can either have been routed to directly or through an partial router.

Implements

Extension Methods