System.Web.UI.WebControls.BaseDataList.DataBind Method

Binds the control and all its child controls to the specified data source.

Syntax

public override void DataBind ()

Remarks

Use the BaseDataList.DataBind method to bind the data source specified by the BaseDataList.DataSource property to the data listing control. By binding the data source to a data listing control, the information in the data source is displayed in a data listing 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 data listing control is specified by the BaseDataList.DataSourceID property, you do not need to call the BaseDataList.DataBind method. ASP.NET calls this method automatically to bind the specified data source control to the data listing control.

Requirements

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