I wanted to walk you through a quick demo on some of the enhancements for data access in Visual Studio 2005. Please note that though I have a bunch of screen shots, the application here is pretty simple. My goal is not to show you the power of the new stuff that makes the developer more productive and a lot of it is the small stuff - which all adds up to a fair amount of FTE’s. So, lets start.

Step 1 - I am going to create a new web site project (as shown in the <strong>screenshot</strong> ) with only one page ( <strong>default.aspx</strong> ) that has a GridView control. More on this control in a few steps.

Step 2 - Adding a database connection. For this exercise I have <strong>SQL Server Express 2005</strong> installed, but there is no reason why you cannot do this with SQL Server 2000 or MSDE. I am going to use the sample pubs db for this. Here are the steps:

Step 3 - Now that you are connected to a database we would want to add a table. I select the author table and drag and drop it to the default page as <strong>shown</strong> .

Step 4 - When you drag and drop the table, Visual Studio automatically created a GridView control. This control automatically picks up the various columns from the table by default. You can configure the data source to your needs, configuring all the selects, updates and deletes. As you can <strong>see</strong> , the control also has built in paging, sorting, updating (if there is such a word), etc. You can also select one of the many built-in <strong>autoformats</strong> to give the control a cool and consistent look and feel.

What is a GridView control? A GridView control, allows you can display, edit, and delete tabular data from many different kinds of data sources, including databases, XML files, and the data exposed by a business object. is the successor to the DataGrid control. This controls displays the values of a data source in a table where each column represents a field and each row represents a record. The GridView control allows you to select, sort, and edit these items. I will detail out the differences between the two in another post.

Step 5 - Lets give it a spin. Press Ctrl+F5, to compile and run the app. As <strong>shown</strong> the data is automatically selected and shown in the selected format. You can also <strong>update the records</strong> if authorised to do so and also <strong>sort and paginate</strong> the rows returned automatically.

Step 6 - Well we don’t really have any more steps, but I want to show you what the project and the code looks like. You can see the default.aspx in design mode and the source mode . Now onto the more interesting stuff, lets see what the <strong>code-beside</strong> looks like. Interesting right, there is not a single line of code!

Here are some more screen shots showing the configuration of Visual Studio 2005.

Summary - To summarise, the demo in itself is nothing great from a technical perspective, but what is interesting is that a developer did not have to write one single line of code. To achieve the same today (in ASP.NET), is not difficult, but does take considerable effort to write, unit-test and debug, especially when you account for the updates of rows, pagination, sorting, etc. Just a small sampling of the new power of ASP.NET 2.0 in Whidbey and all the host of new features that promise to make the live of a developer much better!