System.Web.UI.WebControls.Repeater.DataBind Method

Binds the System.Web.UI.WebControls.Repeater control and all its child controls to the specified data source.

Syntax

public override void DataBind ()

Remarks

Use the Repeater.DataBind method to bind the data source specified by the Repeater.DataSource property to the System.Web.UI.WebControls.Repeater control. When you bind a data source to the System.Web.UI.WebControls.Repeater control, the information in the data source is displayed in the control.

The BaseDataList.DataBind method is also commonly used to synchronize the data source and a data listing control after information in the data source is updated. This allows any changes in the data source to also be updated in a data listing control.

If the data source for the System.Web.UI.WebControls.Repeater control is specified by the Repeater.DataSourceID property, you do not need to explicitly call the Repeater.DataBind method. ASP.NET calls this method automatically to bind the specified data source control to the System.Web.UI.WebControls.Repeater control.

Requirements

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