Bringing It Together
So we have seen how to manipulate the data in a DataTable and DataView, and how to use the SqlCommandBuilder to save changes back to the datasource. Now let's see how they all work together. In this rather lengthy example we are going to create a product edit page for Northwind. This two-page example will contain a list of all the suppliers available in the Suppliers table and a means to edit, insert, and delete each one of their products. Once all edits have been done to their products, there is a confirmation page that lists all inserts, edits, and deletions. From this page, you will be able to decide to save or reject the changes. If you choose to save the changes, then the Products table will be updated. If you choose ...
Get Programming Data-Driven Web Applications with ASP.NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.