Net Getting Started Tutorial: ASP. NET data binding

Source: Internet
Author: User

ASP. NET data binding

We can use data binding to fill the list of optional items from imported data sources, such as a database, an XML file, or a script.


Data Binding
The following Control Lists support data binding:

Dynamic: RadioButtonList
Dynamic: CheckBoxList
Dynamic: drop-down list
Dynamic: list box
The ListItem control is usually defined on one or more pages in each of the preceding controls of an optional project, as shown in the following code:

<Html> <body>
<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"/> </asp: RadioButtonList> </form>
</Body> 

However, for data binding, we may use a separate source, such as a database,

An XML file or script to fill the list of optional projects.

By using the import source, the data is separated by HTML, and any changed items are in a separate data source.

The following three chapters describe how to bind data to a data source script.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.