Murach's ASP.NET 2.0 with C# 2005
How to use object data sources

This chapter shows you how to use object data sources to implement 3-layer applications in which the data access code is kept in data access classes. Unlike the Access and SQL data sources that are covered earlier in the book, object data sources let you separate the the data access code from the presentation code, but still let you use the data binding features of ASP.NET 2.0.

Chapter 16 How to use object data sources
An introduction to object data sources 486
How 3-layer applications work in ASP.NET 2.0 486
How to use the ObjectDataSource control 488
How to configure an ObjectDataSource control 490
A Product List application 492
The aspx file 494
The ProductDB class 496
How to create a data access class 498
How to design a data access class 498
How to create a select method 500
How to create update, delete, and insert methods 502
How to use attributes to mark a data access class 504
A Category Maintenance application 506
The design 506
The aspx file 506
The code-behind file 510
The CategoryDB class 512




Murach's ASP.NET 2.0 with C# 2005

Learn more about this book

View the table of contents

Add this book to your cart



Our Ironclad Guarantee

First, try our books for 90 days. Then, if you aren't completely convinced that our books are the best ones you've ever used, you can return them for a full refund...no questions asked.