ASP.NET
  Home arrow ASP.NET arrow ADO.NET 101: Data Rendering with a Repeate...
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  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
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


    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

    - Adding Content to a Static ASP.NET Website
    - Building a Static ASP.NET Website in a Basic...
    - Develop Your First ASP.NET Website with Visu...
    - Run ASP.NET in Windows XP Home with Cassini ...
    - How to Test a Web Application
    - How to Add Code and Validation Controls to a...
    - Working in Source and Split Views to Build a...
    - How to Build a Web Form for a One-Page Web A...
    - How to Develop a One-Page Web Application
    - An ASP.NET Web Application in Action
    - Developing ASP.NET Web Applications
    - An Introduction to ASP.NET Web Programming
    - Introduction to the ADO.NET Entity Framework...
    - Completing an In-Text Advertising System und...
    - Programming an In-Text Advertising System un...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek