Displaying the data to be deleted (ASP and JSP)
After retrieving the record to delete, it's good practice to display the record before the user deletes
it to confirm that the user wants to delete it.
To add a read-only display of the record to be deleted:
Make sure you defined a recordset to hold the record the user wants to delete.
1
For more information, see
Drag a recordset column from the Bindings panel (Window > Bindings) to the page.
2
Dynamic content appears on the page. You can drop the dynamic content on the page as is, or
you can drop it in an HTML table. For more information, see
on page
547.
The next step in building a page to delete records is to send the delete command to the server.
Sending the delete command to the server (ASP and JSP)
After retrieving and displaying the record to delete, you must add a button the user can click to
delete the record. The delete page uses a form Submit button to send the delete command to the
server. To add a Submit button to your page, you must create an HTML form. The form can
consist of only the Submit button.
To add a Submit button to a delete page:
In Design view, place the insertion point where you want the Submit button to appear and
1
select Insert > Form > Form.
An empty form is created on the page. You may have to turn on Invisible Elements (View >
Visual Aids > Invisible Elements) to see the form's boundaries, which are represented by
thin red lines.
Name the HTML form by clicking the
2
select the form, opening the Property inspector (Window > Properties), and entering a name in
the Form Name box.
You don't have to specify an
to send the record data when the user clicks the Submit button. The Delete Record server
behavior sets these attributes for you.
Add a Submit button to the form (Insert > Form > Button).
3
If you wish, change the label of the Submit button by selecting the button, opening the Property
4
inspector (Window > Properties), and entering a new value in the Label box.
The next step is to add the Delete Record server behavior to update the database table after the
user clicks the Submit button.
"Retrieving the record to delete (ASP and JSP)" on page
tag at the bottom of the Document window to
<form>
or
attribute for the form to tell it where and how
action
method
Building pages to delete a record (ASP and JSP)
712.
"Making text dynamic"
713
Need help?
Do you have a question about the DREAMWEAVER MX 2004-USING DREAMWEAVER and is the answer not in the manual?
Questions and answers