the application doesn't know who we are or what field represents us in the Employees table. In Chapter 29, "Security and User Authentication," we'll add functionality that allows the My Account page to identify our login with a specific row in the Employees table. Ultimately, this association will display the appropriate data in the My Account page. Updating an Existing User Now that you have the form created and all the objects are bound to the appropriate data fields, you are ready to add the functionality that allows users to modify their particular information. Remember the EmployeeID value you added into the hidden TextBox control? This number is used to track which employee is modifying information. If it weren't for this field, the Update Record server behavior wouldn't function properly. To add the Update Record functionality, follow these steps: 1. Select the Update Record server behavior from the Add (+) menu in the Server Behaviors panel. The Update Record dialog appears. 2. Among other tasks, the Update Record dialog allows you to select the form that is submitting the form values. Choose the form [0] option from the Submit values menu. 3. Choose the connDorknozzle option from the Connection menu. 4. Choose the Employees option from the Update Table menu. 5. Use the Columns list to match up the database table's fields with the appropriate web controls in the form. You can use the Value menu to select the appropriate web control in the form. For EmployeeID, make sure that the Primary Key check box is selected. Figure 26.33 shows the dialog with all the necessary modifications. Figure 26.33. Complete the modifications in the Update Record dialog. [View full size image] 6. Before you click OK, add the value x_userupdated.aspx to the On Success, Go To text box. This is the page to which the user is redirected when the update is successful. 7. Click OK to close the Update Record dialog. The new server behavior appears in the Server Behaviors panel. 8. Before you call the page complete, don't forget to create the x_userupdated.aspx page. You can do this by opening the New Document dialog, choosing the Template tab, selecting the template for the DorknozzleASPX site, and clicking Create. With the page open, change the text in the Content editable region to read Your information has been updated. Save the page as x_userupdated.aspx. Switch back to the My Account page, save your work as myaccount.aspx, and test the result in the browser by pressing F12. Modify some of the values (I'll modify the employee's name) using the controls on the form, and click Submit. If everything goes as planned, you are redirected to the x_userupdated.aspx page with the Your information has been updated message. Now open the database, open the Employees table, and observe the data modification.