| A Multipart Series on ASP.NET 2.0's Data Source Controls |
|---|
ASP.NET 2.0 introduced a number of new Web controls designed for accessing and modifying data.
These controls allow page developers to declaratively access and modify data without writing any
code to perform the data access. This article is one in a series of articles on ASP.NET 2.0's new data
source controls.
Data Source Control Basics - explores the concepts
and advantages of data source controls, and compares their usage in ASP.NET 2.0 to data access techniques in ASP.NET 1.x.Accessing Database Data - shows how to use the
SqlDataSource and AccessDataSource controls to query data from a relational database.Filtering Database Data with Parameters - learn how to
retrieve just a subset of database data based on hard-coded values and values from the querystring, other Web controls on the page,
session variables, and so on.Retrieving XML Data with XmlDataSource Control - see how
to retrieve both remote and local XML data and display it in a data Web control.
(Subscribe to this Article Series!
) |
With its new declarative data source controls and improved data Web controls, ASP.NET
2.0 has greatly simplified the process of working with data. In Part 2 of this article series,
Accessing Database Data, we looked at how to use the
SqlDataSource control to retrieve data from a relational database, which could then be bound to any data Web control (such
as the GridView, DetailsView,
FormView, DataList, Repeater, and so on). XML data can be accessed (and displayed) just as easily with the XmlDataSource
control.
The XmlDataSource control makes accessing, filtering, and transforming XML data a simple, code-free process. Additionally,
the XPath() and XPathSelect() databinding methods added to ASP.NET 2.0 make displaying particular
XML values or binding entire XML nodesets just as easy. And the XML data accessed can be from a local file or automatically
downloaded from a specified URL.
In this article we will examine how to use the XmlDataSource control and the XPath() and XPathSelect()
databinding methods, displaying the results in a variety of data Web controls. Read on to learn more!
Read More >