ASP.NET version 1.0 and 1.1 were giant leaps forward in making data-driven
Web sites easier to create. With only a few lines of code you can create Web
sites that dynamically query and update databases, XML files, and more.
Furthering the goal of making Web development easier, ASP.NET version 2.0
makes even those few lines of code unnecessary, thanks to a new set of server
controls called Data Source controls.
Using the new Data Source controls you can declaratively create a link
between the Web user interface (ASP.NET and HTML controls) and the data used
to populate them. The standard CRUD (create, read, update, delete) operations
are supported, including parameterized queries and stored procedures, all of
which are defined using standard HTML syntax. This declarative model allows
you to focus on how the data is used instead of how to get to it. It also
means you ... (more)
In my previous article (.NETDJ, Vol. 2, issue 4) we took a look at how
ASP.NET v2.0's SqlDataSource control allows Web developers to create a
dynamic Web site using data stored in a SQL database with little or no server
code. In this article we're going to build on that by delving into some of
the other new DataSource controls and how we can integrate data from non SQL
sources into an interactive Web page.
XmlDataSource
The XmlDataSource is a new server control used to provide access to
hierarchical data stored as XML. The first step in defining an XmlDataSource
is to specify th... (more)