ASP.NET
  Home arrow ASP.NET arrow ADO.NET 101: Data Rendering with a Repeate...
Iron Speed
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Actuate Whitepapers 
VeriSign Whitepapers 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

ADO.NET 101: Data Rendering with a Repeater Control Introduction
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 12
    2005-11-16

    Table of Contents:
  • ADO.NET 101: Data Rendering with a Repeater Control Introduction
  • Displaying Data from DataReader with a Repeater Control
  • Configuring the Item
  • Displayed data from DataReader

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    ADO.NET 101: Data Rendering with a Repeater Control Introduction


    (Page 1 of 4 )

    This tutorial series describes displaying the data from a DataReader using Iterative data bound controls. This particular article covers displaying data using the data bound control Repeater, which allows a certain degree of flexibility for formatting.

    This how-to tutorial describes displaying the data from a DataReader using Iterative data bound controls. In the first SqlDataReader tutorial, data from a DataReader was displayed mostly by resorting to the Response.Write() method of a web page, or using the AddItem() method of a list control.

    In the second tutorial, the data was displayed by using standard server controls such as Textbox, ListBox, DropDownList, and Table. In this tutorial displaying data using the data bound control Repeater will be described. If you review the previous tutorials you would observe that the rendered display did not offer any built-in flexibility for formatting. The most you could do was to wrap it in a suitable HTML tag which necessitated adding extra tags in the code.

    The iterative technique described in this tutorial offers the RAD technique of flexible, free form formatting of displayed data. When the controls are bound to a data source, the three controls Repeater, DataList, and DataGrid loop through the data row-by-row, and apply a template (html) in rendering on a row by row basis. You will see that setting up an iterative control is slightly harder than using any of the server controls.

    There are differences between each of these controls, so you should make your choice based on your requirements. For example, if paging is one of the requirements, DataGrid is the best choice as the two others are not amenable to paging.

    We have seen that DataReader is best suited for the Read-only, Forward- only type of data retrieval. Hence, when using these controls we are not using the specialized events that can be fired by objects on these controls. However, this tutorial shows the basics of binding data to these controls using the DataReader.

    Iterative Controls

    The next picture shows the three iterative controls as you find them in the collection of web form controls.

    Iterative Controls

    More ASP.NET Articles
    More By Jayaram Krishnaswamy


       · This first of the three articles deals with Data bound controls using the VS 2003...
       · Hello, can you please extend your series to "nesting data web controls". Something...
       · This may not be possible as these controls do not support drag and drop...
     

    ASP.NET ARTICLES

    - Enhancing PHP Via the ASP.NET AJAX Framework...
    - Enhancing PHP Programming with the ASP.NET A...
    - Classes and ASP.NET AJAX
    - Using ASP.NET AJAX
    - Building a Simple Storefront with LINQ
    - Developing a Dice Game Using ASP.NET Futures...
    - Completing an ASP.NET AJAX Server-Centric Ba...
    - Information Management for an ASP.NET AJAX S...
    - Comment and Order Management for an ASP.NET ...
    - Back-end Management Tasks for an ASP.NET AJA...
    - User Information Management for an ASP.NET A...
    - Adding Comments and Search to an ASP.NET AJA...
    - Order-Related Modules for an ASP.NET AJAX Se...
    - User and Role Management for an ASP.NET AJAX...
    - Programming an ASP.NET AJAX Server-Centric B...

    Iron Speed




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway