and so on) by using the CompareValidator control. To insert a CompareValidator control, place your cursor next to the TextBox control you want to validate and select Insert, Tag. Next, select the ASP.NET Tags option and locate the Validation server controls. From the list of validation controls that appear, select asp:CompareValidator and click Insert. Give your CompareValidator a unique ID, type the name of the TextBox control you want to validate in the Control To Validate text box, select DataTypeCheck from the Operator drop-down menu, select Integer from the Type drop-down menu, and provide an error message in the Error Message text field. Save your work again and test the results in the browser. This time, if you type nine two one one five in the Zip code TextBox control and click Submit, you'll receive an error. Inserting a New User Now that your form is created and all your controls will be validated, you are ready to insert the data into the Employees table. Dreamweaver provides a server behavior in the Insert Record server behavior that allows for quick and intuitive insertions into a database table. To insert the employee's record into the database, follow these steps: 1. Select Insert Record from the Server Behaviors panel. The Insert Record dialog appears. 2. Among other features, the Insert Record dialog enables you to select the form on the page that will be submitting the form values. Make sure that the option form [0] is selected from the Submit values from menu. 3. Choose the connDorknozzle option from the Connection menu. 4. Select the Employees table from the Insert Into Table menu. 5. From the Columns list box, identify each database field and match it up with its corresponding web control, selectable from the Value menu. For the most part, Dreamweaver finds the match unless the field names and web controls are named differently (in which case you'll have to match them up on your own). If some do not match, select the appropriate match from the Value drop-down list, as shown in Figure 26.26. Figure 26.26. Match up the appropriate web control with its corresponding field in the database. [View full size image] TIP Unlike the ASP, ColdFusion, and PHP server models, the Insert Record server behavior in the ASP.NET server model supports the insertion of data through a view/stored procedure. Dreamweaver can use these views/stored procedures to insert data into multiple tables (among other things). Views and stored procedures always appear at the bottom of the list in the Insert Into Table menu. 6. Click OK. The Insert Record server behavior appears in the Server Behaviors panel. Save your work and test the result in the browser. Enter data into the fields and click Submit. If everything goes as planned, the page should simply refresh. Now open the database and inspect the Employees table. Your new record should appear. Creating the Redirection Page The final step we want to perform before we can call the New User Registration page complete is to add the functionality that redirects the user to a thank-you page of some sort after they've registered. You can create this functionality by following these steps: 1. While still in the New User Registration page, double-click the Insert Record server behavior. The Insert Record dialog reappears. 2. Enter the value x_newusercreated.aspx in the On Success, Go To text box. 3. Click OK. Save your work.