Murach's ASP.NET 3.5 with VB 2008
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 3.5.

Chapter 17 How to use object data sources
An introduction to object data sources 546
How 3-layer applications work in ASP.NET 546
How to use the ObjectDataSource control 548
How to configure an ObjectDataSource control 550
How to work with bound controls 550
A Product List Application 552
The aspx file 554
The ProductDB class 556
How to create a data access class 558
How to design a data access class 558
How to create a select method 560
How to create update, delete, and insert methods 562
How to use attributes to mark a data access class 564
A category Maintenance application 566
The design 566
The aspx file 566
The code-behind file 570
The CategoryDB class 572
How to use business objects with object data sources 576
How to create methods that use business objects 576
The aspx file for a Category Maintenance application that uses business objects 578
The Category business class 580
A CategoryDB class that uses business objects 580
How to use paging with object data sources 584
How to create an ObjectDataSource control that provides for paging 584
How to create a data access class that provides for paging 586




Murach's ASP.NET 3.5 with VB 2008

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.