Asp. Net Summary (5)-data binding control, asp.net

Source: Internet
Author: User

Asp. Net Summary (5)-data binding control, asp.net

In the previous blog, I have introduced the use of a special control that we often use to implement true/false pagination. This is also a use of bound controls. Let's introduce the data binding technology next!

1. Concept of Data Binding

Data Binding is a very simple and effective technology. Asp.net uses the data binding technology to bind the identification of the display control with the data source. When the data in the data source changes and the webpage is requested again, the attributes in the bound object will change with the data source.

II. Application Scope of Data Binding

Data Binding has a wide range of applications. datasets, arrays, collections, XML documents, and even common variables can all be used as data sources. The attributes of most controls can be bound to objects. In the ASP.net class library, all bound controls are inherited from the BaseDataBoundControl base class, so there are many similar functions.

3. Common Data Binding controls

1. The previous blog of gridview is not described in detail.

2. DropDownList

It is a common data binding control. It is mainly used to provide the single-pick data selection function. When dropdownlist is bound to the data source control, you need to set performanceid as the ID of the data source control, set the Text attribute to bind with a field in the data source, and set the Value attribute to bind with a field in the data source, the items in the dropdownlist will be automatically filled with the queried records in the data source during runtime, and the items corresponding to each record will be automatically copied to the TEST and value attributes in the dropdownlist item.

Summary: This part is a summary of my books, so I want to share it with you, I think the most important thing is that when people encounter something different from the previous things, they need to do more work, observe more, understand more, find out what is different from them, and do their own work to find information about their changes..




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.