ASP. NET 2.0-make good use of the performancemode attribute
SqldatasourceControlPerformancemodeAttributes determine how to maintain the extracted data.
PerformancemodeThe default value of the attribute isDataset, Which indicates the result Assembly extracted from the database is stored in one of the server memory.DatasetObject, if you useSqldatasourceAsGridviewAndGridviewControl, such as sorting, filtering, and pagingSqldatasourceOfPerformancemodeAttribute must be setDataset.
However, on the other hand, if the data extracted by sqldatasource isDropdownlist and ListBoxIf you do not need to sort, filter, or pagination, The datasourcemode attribute of sqldatasource must be set to datareader to reduce resource consumption. After all, in this case, using a dataset is simply a cool-killing tool.
Once youPerformancemodeAttributeDatareader, The data will pass throughIdatareaderThe result set is not stored in the memory of the server.
If you have a clear understanding of the characteristics and differences between the dataset model and the Data command model, I believe you can know when to use it.DatasetAnd when to useDatareader.