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  
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? 
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 / 10
    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


    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

    - Manage Projects with SQL Server Management S...
    - Query Editing and Regular Expressions with S...
    - Using SQL Server Management Studio Tools
    - SQL Server Management Studio
    - Exporting a MySQL Database to Excel Using OD...
    - Controlling Databases with SQL Server 2005 D...
    - Using Recovery Models with SQL Server 2005 D...
    - Handling Database Properties for the SQL Ser...
    - Managing Permissions with the SQL Server 200...
    - SQL Server 2005 Database Engine Security
    - Administering SQL Server 2005 Database Engine
    - Building Applications with Anonymous Types
    - A Closer Look at Anonymous Types
    - Programming with Anonymous Types
    - Converting Your Excel Worksheet into a Worki...





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