BLOGS BY TOPIC
BLOGS BY AUTHOR
BLOGS BY YEAR
With the introduction of the ListView data control in ASP.NET 3.5, there are now 4 separate tools for displaying multiple rows of data in ASP.NET. Which one is best - GridView, Repeater, DataList or ListView?
Posted by Andy Brown on 19 September 2011
You need a minimum screen resolution of about 700 pixels width to see our blogs. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.
ListView Controls in ASP.NET
The ListView web server control was introduced in ASP.NET 3.5, to get round some of the limitations of the DataList control.
Example of a ListView Control
Here is an example of a ListView control:
A ListView with sorting, editing and paging
I haven't shown the underlying HTML here, since it's quite long!
Some of the events supported by a ListView are shown below:
Some of the events which a ListView supports (the ones earlier on in the alphabet are missing). Many of these have equivalent GridView events.
ListViews are cool controls, if somewhat more complicated than the DataList controls they supersede. As for GridViews, my aim is to create a blog about them in the nearish future - watch this space!