O'Reilly logo

Professional ASP.NET 3.5 SP1 Edition: In C# and VB by Devin Rader, Scott Hanselman, Bill Evjen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Data Binding in ASP.NET 3.5

One of the most exciting features of ASP.NET 1.0/1.1 was its capability to bind entire collections of data to controls at runtime without requiring you to write large amounts of code. The controls understood they were data-bound and would render the appropriate HTML for each item in the data collection. Additionally, you could bind the controls to any type of data sources, from simple arrays to complex Oracle database query results. This was a huge step forward from ASP, in which each developer was responsible for writing all the data access code, looping through a recordset, and manually rendering the appropriate HTML code for each record of data.

In ASP.NET 2.0, Microsoft took the concept of data binding and expanded it to make it even easier to understand and use by introducing a new layer of data abstraction called data source controls. It also brought into the toolbox a series of new and powerful databound controls such as the GridView, DetailsView, and FormView. ASP.NET 3.5 continues to make fetching and displaying data in ASP.NET as simple as possible by introducing the LinqDataSource control and the ListView control.

This chapter explores all the provided data source controls, and describes other data-binding features in ASP.NET. It shows how you can use the data source controls to easily and quickly bind data to data-bound controls. It also focuses on the power of the data-bound list controls included in ASP.NET 3.5, such as the GridView, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required