The difference analysis of Datalist,repeater and GridView-practical skills

Source: Internet
Author: User

Griview Advantages: The most powerful, providing pagination, editing, deletion, selection, and many other functions, the most convenient use, drag and drop directly to the page, set up a new data source, a few mouse can maintain a table of browsing, deletion and modification, but also pagination oh. (Increase I haven't figured out how to click a few mouse to achieve, if you know please tell me.) )。 And because the template has been customized, want to own flexible control, not too easy.


Disadvantage: Occupy system resources, his paging is the entire table of data out to the GridView page, so if the amount of data is large, the speed is very very slow. Efficiency is extremely low.

DataList better control style. There are no pages with your own. Edit, etc... Have to write their own handwriting.

There's a repeater.

Advantages: simple function, high efficiency, easy to control the generated HTML code, paging needs to achieve their own, overall, if used repeater will like, suitable for the foreground use.

DataList is between them.

As to when to use the program that depends on your own.

A second person:

Simply put: Gridview,datalist are derived from the WebControl, with WebControl style attributes, which are parsed into table, each of which is resolved to TR-TD,

Repeater is derived from control, it is simply repeating the contents of the template, which is why repeater does not provide itemstyle,selectitemtemplate for these templates and style controls

The flexibility is certainly repeater more flexible, he just loops the content without generating a series of garbage code specified by. NET, but at the same time he loses some of the functionality that. NET provides. But compiling the generated HTML is simpler and therefore more efficient

From the use of words, it is necessary to see you are more adept at using which, repeater more easily set style, the GridView is easier to do additions, deletions and other operations.

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.