ASP.NET Web Forms Data Binding

We may utilize information official to fill records with selectable things from an imported information source, similar to a database, a XML document, or a script.

Data Binding

The following controls are list controls which bolster information binding:

  • asp:RadioButtonList
  • asp:CheckBoxList
  • asp:DropDownList
  • asp:Listbox

The selectable things in every one of the above controls are normally characterized by at least one asp:ListItem controls, as this:


<form runat="server">
<asp:RadioButtonList id="countrylist" runat="server">
<asp:ListItem value="N" text="Norway"/>
<asp:ListItem value="S" text="Sweden"/>
<asp:ListItem value="F" text="France"/>
<asp:ListItem value="I" text="Italy"/>


However, with information restricting we may utilize a different source, similar to a database, a XML record, or a content to fill the rundown with selectable items.

By utilizing an imported source, the information is isolated from the HTML, and any progressions to the things are made in the different information source.

In the following three sections, we will portray how to tie information from a scripted information source.