Database
  Home arrow Database arrow ADO.NET 101: Data Rendering with a DataLis...
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? 
DATABASE

ADO.NET 101: Data Rendering with a DataList Control Introduction
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 8
    2005-11-29

    Table of Contents:
  • ADO.NET 101: Data Rendering with a DataList Control Introduction
  • Displaying Data from DataReader with a DataList Control
  • Data from a DataReader
  • Designing the ItemTemplate
  • 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 DataList Control Introduction


    (Page 1 of 5 )

    This how-to tutorial describes displaying the data from a DataReader using the DataList Iterative data bound control. In an earlier tutorial, how to display data using the data bound RepeaterControl was described. Although this tutorial is self-contained, the reader will find it helpful to review the earlier tutorials covering ADO.NET.

    The iterative RAD technique described in this tutorial offers 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 rendering template (html) on a row by row basis. The free formatting offers a great deal of flexibility, although it requires some effort to configure the control.

    For fast retrieval of data from a database, the DataReader is unbeatable. However it is only suited for the Read-only, Forward-only type of data retrieval. The iterative controls can fire specialized events. In this tutorial we are only looking at binding the data to the DataReader and configuring the control.

    Iterative Controls

    The following picture shows the three controls in the VS 2003 IDE's toolbox. The DataList and DataGrid icons show intuitively that they are related to data.

    the three iterative controls

    What makes the DataList such a flexible tool is the large number of properties and methods available for the designer, as seen in the following class view for DataList.

    More Database Articles
    More By Jayaram Krishnaswamy


       · In a series of articles I have tried to cover data rendering from an SQL Server...
     

    DATABASE ARTICLES

    - Database Programming in C# with MySQL : Usin...
    - Formatting Techniques for Data Access from E...
    - Data Access from Excel VBA
    - Generating a Multiple Table Crystal Report u...
    - ADO and the Command Object
    - On Wiring Up an ADO Data Control
    - Reading and Writing to Files on the Intranet
    - Using ADO Record to Create and Navigate Intr...
    - Using Data Access Pages to Access Data on a ...
    - Using ADO with the SQL Native Client
    - ADO`s Stream Object
    - Opening a Record Object Referencing an Open ...
    - Introducing Jasper (SQL Anywhere 10 Beta)
    - Creating a Database Project in VS 2005
    - Manipulating ADO Recordsets

    Iron Speed




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