Object Data Sources

You may want to create an extensible Web-based application with a clean separation between the three layers of database, business logic, and user interface. ASP.NET 2.0 includes a new data source control that can help you display, edit, and sort data on a Web page with little or no code. The ObjectDataSource control can bind to a specific data layer and represent that data as a business object to other data-bound controls. This allows you to use ASP.NET data source controls such as GridView and DataList while still cleanly retaining your three-tier application architecture.

The Configure Data Source wizard, available from a data control’s Smart Tag menu, makes it easy to set up an object data source. The wizard allows you to specify the methods exposed by the business object for select, update, insert and delete actions. Once configured, your object data source becomes available to use as a data source for controls such as GridView, DataList and DropDownList

Use the Configure Data Source wizard to create a custom business object