Serves as a base class for all controls that generate any type of PageData collection.

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

Syntax

C#
public abstract class PageControlBase : Control, 
	IEnumerable, IPageSource, INotifyPropertyChanged, IPageControl

Remarks

Classes that derive from PageControlBase have very rich data binding support. First they support .NET data binding to for example Repeater and DataList.

Second, PageControlBase supports data binding itself to another data source to extend its data. Can be very useful to serializing data through different controls using different filters, for example when you need to split data delivered from a EPiServer.Web.WebControls.PageList into two different controls. You may also find that data delivered from one control would be better rendered using an other control.

Examples

Simple example showing how data is read and displayed on a page. The PageLink specifies which page the list will be retrieved from.
Copy 
<episerver:PageList MaxCount="1" PageLink="<%#CurrentPage.PageLink%>" runat="server" ID="PageList2">
        <ItemTemplate>
                <episerver:property PropertyName="PageName" runat="server"/>
                <br/>
        </ItemTemplate>
</episerver:PageList>
Illustrates how data from one control can be used by several other controls, in this example it is only PageList1 that delivers data and the others are only used for presentation.
Copy 
<episerver:PageList PageLink="<%#CurrentPage.PageLink%>" runat="server" ID="PageList1"/>

<episerver:PageList MaxCount="1" DataSource="<%#PageList1%>" runat="server" ID="PageList3">
    <ItemTemplate>
        <episerver:property ID="Property1" PropertyName="PageName" runat="server"/>
        <br/>
    </ItemTemplate>
</episerver:PageList>

<episerver:PageList MaxCount="2" SkipCount="1" DataSource="<%#PageList1%>" runat="server" ID="PageList4">
    <ItemTemplate>
        <episerver:property ID="Property2" PropertyName="PageName" runat="server"/>
        <br/>
    </ItemTemplate>
</episerver:PageList>

<asp:Repeater DataSource="<%#PageList1%>" runat="server" ID="Repeater1">
    <ItemTemplate>
        <%#DataBinder.Eval(Container.DataItem,"PageName")%>
        <br/>
    </ItemTemplate>
</asp:Repeater>

Inheritance Hierarchy

See Also