Web Development: How to Build a Master-Details Web Application

A master-details interface is one of the most common types of data access interfaces in use. Imagine data structured hierarchically, like in the TreeView control used in Windows Explorer. With a Master-Details interface you can drill down into the data through successive levels of granularity, the previous level being the "master" for the next level's "details". This helps you find what you need without losing sight of the data's context.

Featured Highlights

Requirements

This application requires the release version of Visual Studio .NET Professional (or greater) and access to the Northwind database residing in SQL Server or the Microsoft Data Engine (MSDE). To install MSDE, do the following:

1. Open the Start menu, click Programs, click Microsoft .NET Framework SDK, and then click Samples and Quickstart Tutorials.

2. Click "Step 1: Install the .NET Framework Samples Database".

3. Open a command window, and CD to [FRAMEWORKSDK]\Samples\Setup This is typically : C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Samples\Setup

4. Type: osql -E -S (local)\NetSDK -i InstNwnd.sql

Running the Sample

Press F5 to run the sample.

Note:

If you get an error when running the sample make sure that IIS has appropriate permissions to query tables in the local SQL Server.  There are multiple ways to achieve this but the easiest way to do this for testing and running samples is to change the default <processModel> settings in machine.config.  The steps to do this are as follows:

1.    Navigate to c:\[WINDOWSDIR]\Microsoft.NET\Framework\[FrameworkVersion]\Config
2.    Open the Machine.Config file found there and change the userName attribute so that it equals SYSTEM
3.    Save the File.
4.    Open up a command prompt and type IISReset to restart IIS.

Another options to use that is more applicable for a production environment is to give appropriate permissions to the ASPNET account in the appropriate database. 

See Also

DataGrid