Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

ASP.NET Data Binding

ASP.NET Web Forms - Data Binding


We can use data binding to populate lists with options that come from an imported data source, such as a database, an XML file, or a script.


Data Binding

The following controls are list controls that support data binding:

The options for each of the above controls are usually defined in one or more asp:ListItem controls, as follows:

However, we can use some independent data source, such as a database, an XML file, or a script, to perform data binding and populate the options of the list.

By using an imported data source, the data is separated from the HTML, and modifications to the options are made in the independent data source.

In the following three sections, we will describe how to bind data from a scripted data source.