Working with Data in ASP.NET 2.0 Displaying Data with the DataList and Repeater Controls
In all of the examples throughout the past 28 tutorials, if we needed to display multiple records from a data source we turned to the GridView control. The GridView renders a row for each record in the data source, displaying the record’s data fields in columns. While the GridView makes it a snap to display, page through, sort, edit, and delete data, its appearance is a bit boxy. Moreover, the markup responsible for the GridView’s structure is fixed - it includes an HTML with a table row () for each record and a table cell () for each field. To provide a greater degree of customization in the appearance and rendered markup when displaying multiple records, ASP.NET 2.0 offers the DataList and Repeater controls (both of which were also available in ASP.NET version 1.x). The DataList and Repeater controls render their content using templates rather than BoundFields, CheckBoxFields, ButtonFields, and so on. Like the GridView, the DataList renders as an HTML , but allows for multiple data source records to be displayed per table row. The Repeater, on the other hand, renders no additional markup than what you explicitly specify, and is an ideal candidate when you need precise control over the markup emitted.
Read more
Working with Data in ASP.NET 2.0 - Using the FormViews Templates
In the last two tutorials we saw how to customize the GridView and DetailsView controls’ outputs using TemplateFields. TemplateFields allow for the contents for a specific field to be highly customized, but in the end both the GridView and DetailsView have a rather boxy, gridlike appearance. For many scenarios such a gridlike layout is ideal, but at times a more fluid, less rigid display is needed. When displaying a single record, such a fluid layout is possible using the FormView control.
Read more
Data Binding with Windows Forms
Data binding is a powerful capability that has finally matured in Windows Forms 2.0 through the capabilities in the .NET Framework classes, combined with the rich designer support provided by Visual Studio 2005. By using data binding properly, you can save yourself from writing a lot of unnecessary code, provide your users a rich interactive experience for working with data that functions well, and produce code that is easy to maintain. To get it correctly across a variety of use cases, you need to know more than how to set a few properties on controls. You need to understand what is going on under the hood, especially if you want to support complex scenarios that require going beyond the basic capabilities of the data binding components in the .NET Framework.
Read more