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..