Displaying Data with the DetailsView
Control
A DetailsView
control renders an HTML table that displays the contents of a single database record. The DetailsView
supports both declarative and programmatic databinding.
For example, the page in Listing 12.1 displays a record from the Movies database table, using declarative databinding (see Figure 12.1).
Figure 12.1. Displaying a movie record.
Listing 12.1. ShowDetailsView.aspx
In Listing 12.1, the SQL Select statement associated with the SqlDataSource
control retrieves the first movie from the ...
Get ASP.NET 4 Unleashed 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.