Setting the Update Record dialog box options (ASP.NET)
The purpose of this dialog box is to add a server behavior to a page containing an HTML form so that users can update a record in a database table when they click the Submit button on the form.
Before starting, you must complete the following tasks:
- Build one or more pages that let the user find the record they want to update. For more information, see Searching for the record to update (ASP.NET).
- Add logic to the update page allowing it to retrieve the users chosen record from the database in preparation for updating. For instructions, see Retrieving the record to update (ASP.NET).
- Add an HTML form to the update page to let users modify the data. For instructions, see Completing the update page block by block (ASP.NET).
With these prerequisites in place, you can complete the Update Record dialog box.
To set the dialog box options:
- Select a form from the Submit Values From pop-up menu.
- In the Connection pop-up menu, select a connection to the database.
Click the Define button if you need to define a connection.
- In the Update Table pop-up menu, select the database table that contains the record you are updating.
- Specify a database column to update, select the form object that will update the column from the Value pop-up menu, select a data type for the form object from the Submit As pop-up menu, and select Primary Key if you want to identify this column as the primary key.
The data type is the kind of data the column in your database table is expecting (text, numeric, Boolean checkbox values).
Repeat the procedure for each form object in your form.
- In the On Success, Go To text box, enter the location of a page to display after the server behavior runs successfully or click the Browse button to browse to the location.
- In the On Failure, Go To text box, enter the location of a page to display if the server behavior fails or click the Browse button to browse to the location.
- Select the Display Debugging Information on Failure checkbox if you want debugging information when the server behavior fails.
When you select this option, Dreamweaver ignores the On Failure, Go To option.
Use the debugging option during development and use the On Failure, Go To option when your site is live.
- Click OK.
Dreamweaver adds a server behavior to the page that lets users update records in a database table by modifying the information displayed in the HTML form and clicking the Submit button.
- Completing the update page block by block (ASP.NET)