ASP. NETData Control Overview:
1.Before3Used to present multiple records,Back2Used to display details of a single piece of data,This is commonly used record details.
2. gridview and detailsview fixed control layout , the layout function of custom data display is limited , it is generally suitable for simple data presentation. 3. datalist, repeater and formview data controls have strong custom Layout capabilities , Complex layout solutions are required for data presentation , 3 controls are preferred.
4. gridview, detailsview and formview all three are . NET 2.0 added controls , built-in paging , sorting and other functions , the degree of improvement is 1.1 the provided controls cannot be compared.
5. datalistAndRepeaterYes1.1Controls provided by Apsara Stack,Weak built-in functions,Implement paging by yourself,Sort,Data Events and other functions.
Interestingly , In the current Asp.net Platform , If the function is used to present a single column of data Detailsview And Formview Counterpart , Detailsview Fixed Layout Formview Custom Layout , Only Gridview To layout fixed data , In terms of functions , No corresponding controls and Gridview Match.
DatalistProvided data functions andGridviewCompared,It is too weak..AndGridviewCompared to data presentation, there is almost no need for programming., DatalistRequirementsProgramThe employee must write it by himself.CodeTo implement the desired function.
ASP. NET Data ControlGridviewControls:
GridviewControls display data in the form of tables, and provides the function of sorting, paging, reading data, and editing or deleting a single record.
Note:GridviewControl isASP. NETProvided in earlier versionsDataGridControls. In addition to adding new features that utilize the data source control function,GridviewControls also implement some improvements, such as defining multiple primary key fields, using bound fields and templates to improve user interface customization, and using new models to process or cancel events.
ASP. NET Data ControlDetailsviewControls:
DetailsviewControls display records in the form of a table at a time, and provides the ability to read multiple records and insert, update, and delete records.DetailsviewControls are usually used in the master/In the detailed information scheme, in this scheme, the main control (suchGridviewThe selected records inDetailsviewControl display records.
ASP. NETData ControlFormviewControls:
formview controls and detailsview similar to a control, it presents a record in the data source at a time, it also provides the ability to read multiple records and insert, update, and delete records. However, formview controls and detailsview the differences between controls are: detailsview controls use table-based layout. In this layout, each field in the data record is displayed as a row in the control. formview the control does not specify the predefined layout for displaying records. In fact, you will create a template containing the control to display each field in the record. This template contains the format, controls, and binding expressions used to set the form layout.
ASP. NETData ControlRepeaterControls:
RepeaterThe control displays the read-only list using a set of records returned by the data source. AndFormviewControls are similar,RepeaterThe widget does not specify the built-in layout. You can use the template to createRepeaterControl layout.
ASP. NETData ControlDatalistControls:
DatalistControls display data in the form of tables. With this control, you can use different la s to display data records,
For example, data records are arranged in columns or rows. You canDatalistAllows you to edit or delete records in a table. (DatalistThe control does not use the data modification function of the data source control. You must provide this code by yourself .)
ASP. NETThe basic information about the five data controls will be introduced here.ASP. NETBasic information about data controls