O'Reilly logo

Dreamweaver MX: The Missing Manual by David Sawyer McFarland

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Tutorial: Authentication

In the tutorial at the end of Chapter 23, you created Web pages that could add, delete, and update records in the Cosmopolitan Farmer database. You wouldn’t want to allow just anyone who visits the Web site to access these pages, let alone delete ads from the site.

Note

ASP.NET Note

Unfortunately, Dreamweaver doesn’t include any tools for adding password protection to ASP.NET pages. For a list of resources covering how to add password protection using ASP.NET, see page 728.

The following steps assume that you’ve worked through the tutorial in Chapter 23, and have all of the completed files ready to go. You’ll build on them in the following steps.

Building a Login Page

The first step is to create a login page—a simple form with fields for a user name and password. After a successful login from this page, an administrator will be able to access the administration pages.

  1. Open the file login.asp in the admin folder of the site.

    This page will contain the form for typing in an administrator’s user name and password. You’ll add the form next.

  2. Choose Insert Form.

    Dreamweaver adds a red dashed line to the page, indicating the beginning and ending <form> tags.

  3. In the Property inspector, type login as the name of the form.

    While this step isn’t required, it’s good to get into the habit of giving your forms helpful names.

  4. In the document window, click inside the red dashed lines and type Username:

    This is the label for the form field you’ll add next.

  5. Choose Insert

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required