System.Web.UI.WebControls.Repeater.EnsureDataBound Method

Verifies that the System.Web.UI.WebControls.Repeater control requires data binding and that a valid data source control is specified before calling the Repeater.DataBind method.

Syntax

protected void EnsureDataBound ()

Remarks

When you specify a value for the Repeater.DataSourceID property, ASP.NET automatically binds the System.Web.UI.WebControls.Repeater control to the specified data source control. When ASP.NET performs data binding for the System.Web.UI.WebControls.Repeater control, it first calls the Repeater.EnsureDataBound method to verify that the control has not already been data bound and that a valid data source control that implements the System.Web.UI.IDataSource interface is specified for its Repeater.DataSourceID property. The Repeater.EnsureDataBound method then calls the Repeater.DataBind method.

Requirements

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