16.1. Working with Data Source Controls

ASP.NET 2.0 provides new data source controls that expose data from a number of data sources to data display controls on Web pages. Data source controls aren't actually shown on the Web pages at browse time and are back-end providers of data to data display controls. But they're very powerful and provide you with capabilities to perform a lot of data retrieval and manipulation operations, such as inserting, updating, deleting, sorting, and filtering, without having to write any code.

By default, the following data source controls are provided by ASP.NET 2.0:

  • SQLDataSource: Allows for connection to an ADO.NET SQL database provider, such as SQL Server, OLEDB, ODBC, Oracle, etc. The properties exposed by this data source control allow you to specify queries to the back-end database, which are then stored directly on the Web page code.

  • ObjectDataSource: Not available in SharePoint Designer, this data source control is aimed at three-tier architecture for data retrieval, where the business logic for querying data is implemented separately rather than having it directly in the Web page code (as in the case of SQLDataSource).

  • XMLDataSource: Allows you to expose data from XML files

  • AccessDataSource: Derived from the SQLDataSource, this control provides properties that allow you to specify the MS-Access database filename directly while creating the data source control.

  • SiteMapDataSource: Allows you to retrieve data from the ASP.NET site navigation hierarchy ...

Get Microsoft® Office SharePoint® Designer 2007 Bible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.