My Working with Data in ASP.NET 2.0 tutorial series has been updated with five new tutorials: one on building database-driven site maps and four on working with batched data.
The site map feature introduced in ASP.NET 2.0 allows developers to logically arrange a web application's pages into a hierarchy. This hierarchy can then be accessed programmatically through the SiteMap class in the .NET Framework or rendered visually through the Menu, TreeView, and SiteMapPath controls. .NET ships with a site map implementation that serializes the site map to an XML file. Since the site map framework was designed using the provider model, developers can easily plug in their own serialization implementations. (For more on ASP.NET 2.0's site map feature, see Examining ASP.NET 2.0's Site Navigation.) Building a Custom Data-Driven SiteMap Provider [VB | C#] looks at how to create a site map provider that constructs the site map based on data pulled from the application architecture.
The remaining four tutorials look at working with batched data. By default, the GridView is designed to modify data one record at a time. The built-in Delete and Edit buttons, for example, allow for one record to be deleted or updated. This can result in a lot of pointing and clicking when you need to delete or edit multiple records. The four tutorials on working with batched data examine important considerations and illustrate how to customize the data Web controls to create a user interface conducive to batch deletes, updates, and inserts:
- Wrapping Database Modifications within a Transaction [VB | C#] - looks at how to wrap a series of database modifications within the scope of a transaction. Transactions guarantee atomicity, ensuring that either all of the batched modifications will succeed or none of them will.
- Batch Updating [VB | C#] - examines turning a GridView into a fully-editable GridView, where all rows can be edited at once.
- Batch Deleting [VB | C#] - shows how to add a series of checkboxes to a GridView to enable multiple records to be deleted at the click of a button.
- Batch Inserting [VB | C#] - explores a user interface for quickly inserting multiple records.
Like the previous tutorials in the series, all tutorials are available in C# and VB, include the complete code download as a self-extracting ZIP, and are available in PDF format.
Happy Programming!