
here's no shortage of useful, new controls to investigate in ASP.NET 2.0. In my
last article, I discussed the new GridView and DetailsView controls. In that article I also discussed the use of the SqlDataSource control, which allows you to declaratively connect to a SQL data source without any coding.
Besides the SqlDataSource control, ASP.NET 2.0 comes with several other new data source controls:
- AccessDataSourceconnects to an Access database
- ObjectDataSourceconnects to a business object and treats it as a data source
- DataSetDataSourcemanipulates an XML document as a dataset
- XmlDataSourceloads an XML document for binding to controls such as the DataList and TreeView controls
- SiteMapDataSourceloads a site map file and exposes it to controls such as the TreeView and SiteMapPath controls
Figure 1 shows these new data source controls under the Data tab in the Toolbox.
 | |
| Figure 1. In Control: The various data source controls are stored under the Data tab in the Toolbox. |
In this article, I will concentrate on the ObjectDataSource control, DataSetDataSource control, and the XmlDataSource control. The SqlDataSource control is discussed in the previous article and the AccessDataSource control is similar to it, except that it connects to an Access database. That leaves the SiteMapDataSource control for discussion in a future article where I'll use it to build navigation objects.