Creating the master page (ASP.NET)

Creating the master page (ASP.NET)

This section describes how to create a master page that lists database records. With ASP.NET, you can use a DataGrid to list the records on the page.

Before you start, make sure you define a database connection for the site. For more information, see Database Connections for ASP.NET Developers.

To create a master page:

  1. Create a new ASP.NET page.

    Select File > New > Dynamic, select an ASP.NET page format, and click Create. A blank .aspx page opens in Dreamweaver.

  2. Define a DataSet for the page.

    In the Bindings panel (Window > Bindings), click the Plus (+) button, select DataSet (Query), and complete the dialog box. For more information, click the Help button on the dialog box. If you want to write your own SQL statement, click the Advanced button to open the advanced DataSet dialog box.

    Make sure the DataSet contains all the table columns you need to create your master page.

    The DataSet must also include the table column containing the unique key of each record--that is, the record ID column.

    Typically, the DataSet on the master page extracts a few columns from a database table while the DataSet on the detail page extracts more columns from the same table to provide the extra detail.

    The DataSet can be defined by the user at runtime. For more information, see Building a database search page (ASP.NET).

  3. Create a DataGrid on the page.

    In the Server Behaviors panel (Window > Server Behaviors), click the Plus (+) button, select DataGrid, and complete the DataGrid dialog box. For more information, click the Help button on the dialog box. For now, accept the default column type of Simple Data Field for each column in your DataGrid. In the next section, you’ll change the type of one column to Hyperlink (see Opening a detail page and passing a record ID (ASP.NET)).

Here’s an example of a DataGrid dialog box that defines three columns.

This is a picture of the feature being described.

The next step in creating master/detail pages is to create links that open the detail page and pass the ID of the record the user selected. See Opening a detail page and passing a record ID (ASP.NET).



Getting Started with Dreamweaver
Dreamweaver Basics
Working with Dreamweaver Sites
Laying Out Pages
Adding Content to Pages
Working with Page Code
Preparing to Build Dynamic Sites
Making Pages Dynamic
Developing Applications Rapidly
Building ColdFusion Applications Rapidly
Building ASP.NET Applications Rapidly
Reference
Building ASP and JSP Applications Rapidly
 
ASPTreeView.com
 
Evaluation has єЗНЩexpired.
Info...