first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

MCAD/MCSD Notes: Chapter 5, Lesson 2; Using Data Sets on Web Forms

Lesson 2: Using Data Sets on Web Forms

The purpose of this lesson is to detail the easiest ways to use the DataGrid and DataList controls, to bind data to other controls such as the DropDownList control and to briefly explore executing commands directly against a data connection.

The Visual Studio Web forms designer provides an interactive, design-time way to declare DataGrid display and editing functionality. Creating Template columns with Button columns, using the DataGrid Property Builder is the first step.

This is one example of how the Visual Studio .NET 1.x designer depends on code for "advanced" functionality.

These three methods are available from the database connection object: ExecuteScalar(), ExecuteNonQuery() and ExecuteReader().

For performance reasons, catching a "context sensitive" exception like InvalidOperationException or SqlException is best practice over dropping down to an Exception catcher.

mod date: 2005-05-23T21:06:51.000Z