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 select Insert > Form > Form.
An empty form is created on the page. You may have to enable Invisible Elements (View > Visual Aids > Invisible Elements) to see the forms boundaries, which are represented by thin red lines.
- Name the HTML form by clicking the
<form> tag at the bottom of the Document window to select the form, opening the Property inspector (Window > Properties), and entering a name in the Form Name box.
You dont have to specify an
method attribute for the form to tell it where and how 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).
- If you wish, change the label of the Submit button by selecting the button, opening the Property 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. See Sending the delete command to the server (ASP and JSP).