Macromedia dreamweaver 8-using dreamweaver Manuel D’Utilisation

Page de 1030
922
Chapter 41:  Building ASP.NET Applications Rapidly
Completing the update page block by block 
(ASP.NET)
An update page has three building blocks:
A filtered DataSet to retrieve the record from a database table (see 
)
An HTML form to let users modify the record’s data
An Update Record server behavior to update the database table
You can add the final two basic building blocks of an update page separately using the form 
tools and the Server Behaviors panel.
Before you can add the building blocks, your web application must be able to identify the 
record to update, and your update page must be able to retrieve it. See 
, and 
.
Completing the update page consists of three tasks:
Adding an HTML form to the page to let users modify the data
Displaying the record in the form by binding the form objects to database table columns
Adding the Update Record server behavior to update the database table after the user 
modifies the record
To add an HTML form to an update page:
1.
Create a new ASP.NET page.
This will become your update page.
2.
Lay out your page using the Dreamweaver design tools.
3.
Add an HTML form by placing the insertion point where you want the form to appear and 
selecting Form from the Insert menu.
An empty form is created on the page. You may have to enable Invisible Elements (View > 
Visual Aids > Invisible Elements) to see the form’s boundaries, which are represented by 
thin red lines.
4.
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 don’t have to specify an 
action
 or 
method
 attribute for the form to tell it where and 
how to send the record data when the user clicks the Submit button. The Update Record 
server behavior sets these attributes for you.