Dreamweaver MX ASP Tutorials Macromedia Dreamweaver MX

Create an Add User Page - Step I

In this tutorial I will show you how to create an Add User page. This method uses the Insert Record Server Behavior.

Click here for the login page. Username = Admin and Password = admin. Then select Add New User from the menu.

1. Open the backsideBase.asp page.

2. Save it as addUser.asp by clicking File > Save As and naming it addUser.asp.

3. Save it as listUsers.asp by clicking File > Save As and naming it listUsers.asp.

4. Close all pages except the listUsers.asp page, that is what we will be working on first.

5. Click inside the contentLayer and then Insert > Table and use the following settings in the Insert Table window.

Insert Table

6. Click inside the table cell that you just inserted and change the Bg to #666666 in the Property Inspector.

7. Click inside the table cell and then Insert > Table and use the following settings in the Insert Table window.

Insert Table

8. Click inside each table cell (there are 8 of them) and change the Bg to #FFFFFF in the Property Inspector.

9. Click in the top left table cell and type Last Name. Then right-click on the <td> in the bottom of the Design View window and select Set Class > tblHeader.

10. Click in the next cell in the top row and type First Name. Then right-click on the <td> in the bottom of the Design View window and select Set Class > tblHeader.

11. Click in the next cell in the top row and type Username. Then right-click on the <td> in the bottom of the Design View window and select Set Class > tblHeader.

12. Click in the next cell in the top row and type Password. Then right-click on the <td> in the bottom of the Design View window and select Set Class > tblHeader.

13. Click in each cell in the bottom row and then right-click on the <td> in the bottom of the Design View window and select Set Class > tblData.

14. Create a new recordset by clicking the (+) sign in the Bindings Panel (CTRL + F10) and selecting Recordset(Query) and using the following settings in the Recordset window.

Recordset

15. Click the Test button in the Recordset window and you should see the following in the Test SQL Statement window. Click OK in the Test SQL Statement window and the Recordset window.

Test SQL Statement

16. In the Bindings Panel, click on the (+) sign to the left of Recordset(rsUsers) to expand it.

17. Click on LastName and drag it into the left table cell in the second row.

18. Click on FirstName and drag it into the second cell in the second row.

19. Click on Username and drag it into the third cell in the second row.

20. Click on fPassword and drag it into the last cell in the second row.

21. Click on the <tr> in the bottom of the Design View window, and then click on the (+) sign in the Server Behaviors Panel (CTRL + F9) and select Repeat Region. Use the following settings in the Repeat Region window and click OK.

Repeat Region

22. Click on the (+) sign in the Server Behaviors Panel (CTRL + F9) and select Show Region > Show Region If Recordset Is Not Empty. Use the following settings in the Show Region If Recordset Is Not Empty window and click OK.

Show Region If Recordset Is Not Empty

23. Click below the table and type Backside Menu.

24. Highlight Backside Menu and then click on the folder icon next to Link in the Property Inspector and select the backsideMenu.asp page.

25. Save the listUsers.asp page and close it.

Click here to continue the tutorial.