ASP. NET 2.0-use the performancemode attribute to establish cnblogs from the chapter)

Source: Internet
Author: User
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.

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.