Murach's ASP.NET 2.0 Upgrader's Guide: C# Edition
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. This lets you separate the presentation code from the data access code, but still lets you use the data binding features of ASP.NET 2.0.

Chapter 7 How to use object data sources
An introduction to object data sources 228
How 3-layer applications work in ASP.NET 2.0 228
How to use the ObjectDataSource control 230
How to configure an ObjectDataSource control 232
A Product List application 234
The aspx file 236
The ProductDB class 238
How to create a data access class 240
How to design a data access class 240
How to create a select method 242
How to create update, delete, and insert methods 244
How to use attributes to mark a data access class 246
A Catagory Maintenance application 248
The design of the Category Maintenance application 248
The aspx file 248
The code-behind file 252
The CategoryDB class 252
How to use aggregate data types and detect concurrency errors 256
How to create an aggregate data type 256
How to use an aggregate data type 258
How to check for concurrency errors 260
How to use the generics feature to return a typed list 262
A Category Maintenance application that uses an aggregate class 264
The code-behind file 264
The CategoryDB class 264




Murach's ASP.NET 2.0 Upgrader's Guide: C# Edition

Learn more about this book

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.