System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls Method

When overridden in an abstract class, creates the control hierarchy that is used to render the composite data-bound control based on the values from the specified data source.

Syntax

protected abstract int CreateChildControls (IEnumerable dataSource, bool dataBinding)

Parameters

dataSource
An IEnumerable that contains the values to bind to the control.
dataBinding
true to indicate that the CompositeDataBoundControl.CreateChildControls(IEnumerable, bool) is called during data binding; otherwise, false.

Returns

The number of items created by the CompositeDataBoundControl.CreateChildControls(IEnumerable, bool).

Remarks

The CompositeDataBoundControl.CreateChildControls method is a helper method that is used by classes that derive from the System.Web.UI.WebControls.CompositeDataBoundControl class to create the control hierarchy for a composite data-bound control. When extending the System.Web.UI.WebControls.CompositeDataBoundControl class, you must override the CompositeDataBoundControl.CreateChildControls method to create your own control hierarchy. For more information on creating a composite control, see Developing Custom ASP.NET Server Controls.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0