ONLINEPROOFINGSITE.COM

proof of process - www.onlineproofingsite.com

Menu


4. Make sure that the rsUpdateEmployee recordset is selected from the Select Record From menu. 5. To append the EmployeeID to the WHERE


clause of the UPDATE statement that the Update Record server behavior will eventually generate, select the EmployeeID option from the Unique Key column menu. 6. Enter the value x_userupdated.asp, x_userupdated.cfm, or x_userupdated.php (depending on the server model you are using). As was the case with the New User Registration form, this is the page the user will be redirected to after they've made their update. 7. Make sure that the form1 option is selected from the Get Values From menu. 8. Like the Insert Record dialog, the Update Record dialog allows you to match up the form elements in the form with the appropriate fields in the database table. For the most part, all the form elements should be matched up for you. Remember that you must select <ignore> for the EmployeeID form element. You'll end up receiving an error if you try to update this field, because it is an automatically generated number in the database and cannot be updated. Figure 26.19 shows the Update Record dialog with all the necessary values set. Figure 26.19. Complete the modifications to the Update Record dialog. [View full size image] 9. Click OK. The new Update Record server behavior appears in the Server Behaviors panel, and the form is highlighted in blue (because it is an invisible element). 10. To complete the My Account page, create a new page from the site's Template and call the new page x_userupdated.asp, x_userupdated.cfm, or x_userupdated.php depending on the server model you're working with. On the page, enter the text Your information has been modified. Switch back to the My Account page, save your work, and test the result in the browser. After the form appears, change a value in the form (I'll modify Ada's name) and click Submit. Figure 26.20 shows the result of the change in the database. Figure 26.20. Ada's name in the database has been updated based on the value I specified in the form. [View full size image]             Building the New User Registration Page Using ASP.NET Building the employee store New User Registration page can be accomplished just as easily under the ASP.NET server model as it was with the ASP, ColdFusion, and PHP server models. In fact, there are only subtle differences in the construction process. Most of the differences between ASP.NET and the other server models lie in the code, behaviors, and the interfaces that those behaviors implement. If you are specifically interested in ASP.NET, this section covers everything you need to know as it relates to inserts, updates, and deletes using ADO.NET and ASP.NET. Before we begin constructing the new user registration web page using ASP.NET, let's review the structure of the tables that we'll end up interacting with in this section. Recall that the tables that contain employees' information are the Employees, CreditCards, and Departments tables. On further inspection of those tables, notice that the following fields are necessary for new employees to be created in the Employees table: