Creating a data connection and then displaying data
First, three basic tutorials showing how to add a data connection to a site
and then add an ASP.Net control that fetches data from a database.
Step 1: Add our Data Connection
You can use data from a range of data sources with ASP.Net controls. Here
we'll create a site-wide connection to a database. This needs only to be
specified once and can then be used on multiple pages.
Adding the Data
Connection (Flash with audio, 1024*768)
Step 2: Adding an ASP.Net control to display data
There are five basic 'display' controls that can be used to display groups or
lists of information from a data source (the DataList, DetailsView, FormView,
GridView and Repeater) and others that are more likely to be used for selecting
data or displaying individual records.
In this example were going to use the data connection created above to
display data in a GridView.
Adding a GridView
(Flash with Audio, 1024*768)
Step 3: Formatting the GridView
The basic GridView gives a plain view of our data. Lets make it look more
attractive.
Formatting a
GridView (Flash with audio, 1024*768)
Step 4: Some other possibilities.
Lets look at paging and formatting the data.
GridView
paging and data formatting (Flash with audio, 1024*768)
Step 5: Using a DropDownList to select the record to be
displayed.
In this example we use the GridView again but with a DropDownList to select the
database record we want to display.
DropDownList
(Flash with audio)