1

I have worked with both the controls for simple application development . Both almost do the same functionality. What is the difference between them ?

1

3 Answers 3

4

There is a table here that compares the data bound server controls:

http://weblogs.asp.net/anasghanem/archive/2008/09/06/comparing-listview-with-gridview-datalist-and-repeater.aspx

1

GridView always renders as a grid. Repeater allows you to create your own template layout. For instance, you can put things in divs. GridView also has a much more rich object model, while repeater is rather simplistic.

Yes, you can achieve similar results with both, but they are nowhere near the same thing.

1
  • 1
    Not necessarily... GridView also supports ItemTemplate and other rendering tags. You can put things in div in GridView as well
    – Anurag
    Feb 1, 2012 at 9:29
0

Both these controls are Data-Bound Web Server control.

GridView : It displays data as a table and has ability to preform sort, paging,edit and delete a record.

Repeater : has fewer templates then GridView. It renders a read-only list from the datasource.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.