Recall that when we created the Table Adapters in the DAL in our first tutorial, Visual Studio automatically added methods for inserting, updating, and deleting data from the underlying database table.Moreover, in Creating a Business Logic Layer we designed methods in the BLL that called down into these data modification DAL methods.Rather than have each control using its own Object Data Source, however, let's just create a single Object Data Source that all three control examples can share.Open the methods can be configured by selecting the appropriate tab from the list along the top.There are many subtleties and edge cases in the real-world that make providing such functionality more involved than just point and click.This tutorial, however, focuses solely on proving simplistic data modification capabilities.
These controls simply work with data supplied to them.
In addition to its method, these three methods can be mapped to methods in an underlying object.
When configured to insert, update, or delete data, the Grid View, Details View, and Form View controls provide a user interface for modifying the underlying data.
We'll look at the Grid View, Details View, and Form View separately, as these data Web controls differ in their data modification capabilities and configuration.
As we'll see in the remainder of this article, adding very basic editing, inserting, and deleting support through the Grid View, Details View, and Form View controls is really as simple as checking a couple of checkboxes.