Building Data-Oriented Web Forms

ASP.NET emphasizes the use of advanced web controls for building user interfaces. Three main advanced-focused data web controls come with ASP.NET:

  • DataGrid

  • Repeater

  • DataList

This section briefly analyzes three examples of how to use these three controls to display and modify data.

The DataGrid Control

In the previous section, we saw many examples that used the DataGrid control to display data. However, the appearance of the generated ASP.NET pages is not very attractive, even for non-designers, so something needs to change. The DataGrid control enables a lot of customization, and we will see it now in Listing 6.9.

Listing 6.9. DataGrid Control (609.aspx)
 01 <%@ Import Namespace = "System.Data" %> 02 <%@ Import ...

Get Inside ASP.NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.