Learn to Use the New Data Source Controls in ASP.NET 2.0
You can declaratively connect your data sources to Web form controls with ease in ASP.NET 2.0. In this article, three new data source controls are described in detail: ObjectDataSource, DataSetDataSource, and XmlDataSource.
by Wei-Meng Lee
October 28, 2004
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.
It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com. Already a member?
To become a member of DevX.com create your Member Profile by completing the form below. Membership is free!