Skip to Content
ASP.NET 4 Unleashed
book

ASP.NET 4 Unleashed

by Stephen Walther, Kevin Hoffman, Nate Dudek
October 2010
Intermediate to advanced
1920 pages
73h 55m
English
Sams
Content preview from ASP.NET 4 Unleashed

Binding to a DataSet

You also can use the ObjectDataSource when you need to represent an ADO.NET DataSet. Using a DataSet is slower than using a DataReader; however, you can perform advanced operations, such as filtering and sorting, on data represented with a DataSet.

The component in Listing 18.5 returns all the records from the Movies database table. However, it uses a DataSet instead of a DataReader object.

Listing 18.5. MovieDataSet.cs

images

The component in Listing 18.5 uses two ADO.NET objects: DataAdapter and DataSet. The SqlDataAdapter represents the SQL select command and populates the DataSet with the results of executing the command. The ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

ASP.NET 3.5 Unleashed

ASP.NET 3.5 Unleashed

Stephen Walther
ASP.NET 4.0 in Practice

ASP.NET 4.0 in Practice

Marco De Sanctis, Daniele Bochicchio, Stefano Mostarda

Publisher Resources

ISBN: 9780132565851Purchase book