Asp.net-Overview of data binding controls and data source controls

Source: Internet
Author: User

1.asp.net data binding controls are divided into three categories, each of which is described in detail:
● Hosted data binding control: the hosted data binding control is usually used to bind a field in a table. Displays information about all data in a field.
It includes the following controls: bulletedlist, checkboxlist, dropdownlist, ListBox, radiobuttonlist
For details, refer to the following:Article: Http://www.cnblogs.com/shipfi/archive/2009/10/15/1584050.html

● Table-based data binding control: Table-based data binding control is often used to display table data, that is, data can be displayed in multiple rows and columns.
It includes the following controls: gridview, datalist, repeater, detailview, formview
Refer to the following article: http://www.cnblogs.com/shipfi/archive/2009/10/15/1584054.html

● Hierarchical data binding control: Used to nest data items. You can use hierarchical data binding to display data records of folders and page structures, XML file content, or master-slave structures.
It includes the following controls: menu, Treeview
For details, refer to the following articles:

2. The data binding control can be bound to the data source control. Asp.net includes the following data source controls:
● Sqldatasource: SQL Relational Database
● Accessdatasrouce: Access Database
● Objectdatasource: Business Object Data
● Xmldatasource: XML document data
● Sitemapdatasource: Provided by site mapProgramData
The preceding data source controls are derived from performancecontrol. To implement custom data source controls, use the performancecontrol base class.
Sqldatasource is a relatively large number of controls used in Asp.net and will be described separately in other articles. See:

3. About performancecontrol and databindcontrol
most ASP. NET data source controls extend the performancecontrol abstract class, which provides the basis implementation of the idatasource interface. In addition, the datasourcecontrol class also provides the implementation of the ilistsource interface, which allows you to programmatically allocate the data source control to the datasource property of the data binding control and return the data as the basic list to the control.
the data source control can be considered as a combination of the performancecontrol object and its associated data list (called the data source view. Each data list is represented by a performanceview object. Because the basic data storage contains one or more data lists, performancecontrol is always associated with one or more specified performanceview objects.
All ASP. NET controls derived from the databoundcontrol class can be bound to data source controls. When databoundcontrol is bound to a data source control, it automatically performs data binding at runtime. You can also use the data source control with the ASP. Net control that meets the following conditions: expose the datasource or performanceid attribute and support basic data binding but not deriving from databoundcontrol. When using these data binding controls, you must explicitly call the databind method.
the databoundcontrol class is used for ASP. net controls, these controls are from ASP. NET data source control to retrieve data in the form of tables or lists, and bind the control's user interface (UI) elements to those data for display.

If you want to customize controls for binding data sources to data sources, you can derive them from the performancecontrol and databoundcontrol classes. In the following example of msdn, a corresponding example can be provided to derive custom data source controls and data binding controls:
MS-help: // Ms. VSCC. v90/ms. msdnqtr. v90.chs/fxref_system.web/html/ea8a2375-674e-f1ee-e550-526ac0739c53.htm
MS-help: // Ms. VSCC. v90/ms. msdnqtr. v90.chs/fxref_system.web/html/1a442431-f81b-5734-502a-4560f3764a44.htm

Related Article

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.