A connection string is a string that contains the information necessary to connect to a database on a server. You can store the connection string in the web. config file for later use.
Create (add a new record), Retrieve, Update (edit), and Delete.
GridView's Smart Tag and
the "Choose Data Source" drop-down list.
Turn on paging by clicking the Smart Tag, and selecting Enable Paging.
It safeguards your data by only writing changes to the database if none of the records have changed since the records were read.
Enable Updating and Deleting, from the Smart Tag.
Create an event handler for the
Exercise 4-1. Here's one way to get a page that looks like Figure 4-27:
Create a new web site as usual. Name it Exercise 4-1.
SqlDataSource control onto
the Design view.
GridView control onto the
Design view. Click the
Smart Tag, go to the "Choose Data Source" drop-down list, and select
Click "Configure Data Source" in the Smart Tag. The Configure Data Source Wizard starts. You can use the connection string from the other exercises in this chapter. Click Next.
On the next page, click the radio button marked "Specify columns from
a table or view," and select the
Product table from the drop-down list. Check the boxes
ProductID, Name, ProductNumber,
The Wizard should look like Figure C-2 ...