Three rich data controls in ASP. NET: gridview, repeater, and datalist

Source: Internet
Author: User

1: The pagination function cannot be used for the gridview with datareader as datasource. The reason should be that datareader does not implement the icollection interface.

2: when using the pagination function of the gridview, in addition to setting allowpaging = "true", you must also handle a pagdexdexchanging event (onpageindexchanging attribute ).

As for paging, it should be clear that automatic paging does not reduce the data size of database queries. On the contrary, each time a user changes the current page number, all data needs to be obtained and bound. In other words, if you divide a table into ten pages and the user browses each page in turn, you will have to execute the same job ten times (at the same time, the overall burden on the database is increased by ten times !) Therefore, the cache technology is used to improve performance.

The above is the case when the page is automatically paged by the gridview. You can also use custom pages to retrieve and bind records of the current page for the gridview.

 

Ah ah! So JB is complicated !!!!!!!!!!! Lao Tzu does not read

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.