1. gridview Control
This control can display, edit, and delete data in a variety of different data sources (such as databases, XML files, and collections) in the form of tables. The gridview control is very powerful. If needed, programmers do not need to write any Code , Drag and drop through vs 2008, set properties from the property panel, and complete functions such as paging, sorting, and appearance settings. Although the functions are very complete Program Performance will be affected. It is best not to use this control too much on the page. Of course, if you need to display various data in a custom format, the gridview control also provides the template function for editing the format.
2. datalist Control
This control can display fields of various data sources in a custom format (not necessarily using Table labels). The format of the displayed data is defined in the created template, you can create templates for items, alternate items, selected items, and edit items. The datalist control can also use the title, footer, and delimiter template to customize the overall appearance, and display multiple data rows in one row. Although the datalist control has great flexibility, it does not support data paging. programmers must compile their own methods to complete the paging function.
3. detailsview Control
The detailsview control displays only one record of the data source at a time in the form of a table tag, and each row under the table tag (TR tag) represents a field in the record. This control also supports data editing, insertion, and deletion, and allows you to easily set the paging function. However, the detailsview control does not support data sorting.
4. formview Control
Similar to the detailsview control, the formview control only displays a single record in the data source. Different from the detailsview control, the detailsview control uses the table layout (Table label). Each field in the record is displayed as a row. The formview control is not used to display the preset layout of records. Programmers need to create subitem templates and compile various controls used to display fields in records and other HTML labels for layout. Like the detailsview control, the formview control can easily enable the paging function. If only one record is displayed, the formview control is recommended because you can customize the data display format while developing it efficiently.
5. Repeater control
Before the emergence of the listview Control, this is a commonly used control, because the Repeater control is a data binding container control, used to generate a list of each sub-item, the Display Method of these subitems can be completely edited by the programmer. When the control is running on the page, the control displays the data format defined in the template based on the number of data rows in the data source. programmers can fully grasp the data display layout, such as Div and ul.
Note: The Repeater control only provides the duplicate template Content Function and does not provide paging, sorting, editing, and other functions. These functions must be implemented by programmers themselves.
6. listview Control
The listview control displays data in the template format written by the programmer. Similar to the datalist and repeater controls, the listview control applies to any data with duplicate structures. However, the listview control provides data operations such as editing, inserting, and deleting data. It also provides the data sorting and paging functions, which can be directly set in vs 2008, you do not need to write code, which is very similar to the gridview control. It can be said that listview has both open templates of the Repeater control and editing features of the gridview control.
Note: The listview control is a new control in ASP. NET 3.5. Its paging function must be implemented with the datapager control.