decorative banner

Creating update pages


    A sample page that displays the details of a single record and also lets you edit the record.
    A sample page that displays the details of a single record and also lets you edit the record.

    A details page can do more than simply display one record on a page. If it lets you modify the record as well, the page is commonly called an update page. You can enhance your details page with buttons that let you edit the record displayed in various ways. This section assumes you already have a site created, open, and configured as a dynamic content site. Open a blank page in the site, make it dynamic, and add a content source to the page. For this example, you'll do the following:

    • Create a form.
    • Create buttons with update actions, such as Update, Delete, and Copy.

To create a form area on the details page:

  1. Drag the Form object from the Forms set of the Objects palette to the Layout Editor, just above or below the table, if you created one for laying out your fields on the details page.
  2. Select everything on the page except the form container.
  3. Drag the selection on top of the form container, and release.
  4. Now that everything on your page is enclosed in a form, you can add form buttons, and actions to those buttons that let you or a site viewer modify the displayed record in various ways.

To add form buttons that let you edit the current record or add a record:

  1. Click the Dynamic Content button in the Objects palette.
  2. Drag the Submit Action object from the Dynamic Content set in the Objects palette five times to the desired location on the page (somewhere within the form container).
  3. Select the first Submit Action button.
  4. In the Input Button Inspector, set Label to Update.
  5. In the Dynamic Bindings palette, click Action, choose ADO Database > Update Record, and select a content source.
  6. Select the On Failure, Redirect To option, and link to config/actions/glerror.asp.
  7. Repeat steps 3 through 6 for the remaining buttons:

    Button Name

    Values

    Add

    Input Button Inspector:

    • Label = Add

    Dynamic Bindings palette:

    • Action = Add Record

    Delete

    Input Button Inspector:

    • Label = Delete

    Dynamic Bindings palette:

    • Action = Delete Record

    Clear

    Input Button Inspector:

    • Label = Clear

    Dynamic Bindings palette:

    • Action = Clear Form Data

    Copy

    Input Button Inspector:

    • Label = Copy

    Dynamic Bindings palette:

    • Action = Copy Form Data
  8. Note: In order to fully test updating, you must have your site and database uploaded to a properly configured Web server and then access the site normally through a browser by entering its URL. You cannot use the updating functionality within the GoLive Preview tab or by using the Preview in Browser feature.