This tutorial will show how we can use a GridView control to display and update data in a SQL database.

Firstly, we need a connection to the database. In Web.config:

Using DetailsView and GridView controls to view and update data in two different ways. Both using the same DataSource, from the same database.
The ASPX code:

No code needs to be written for this simple data manipulation using GridView – Visual Studio generates the code for you.

Download Source Files