Behind the Scenes at Exploration Air


Return to Previous Page B  A  C  K

V I E W   S O U R C E

How The Logon Page Works


Functional Overview

Before users can visit the pages of Exploration Air's Frequent Flyer site, they must log on. Users who already have a Frequent Flyer account use the Login.asp page to enter their frequent flyer number and password. Once they click on the Logon button, the form is checked to see if all fields are filled correctly using a function called validate() written in JavaScript. If the user has entered a valid number in the Account Number field, the form is submitted to itself.

Login.asp then loads for a second time. Before it displays any HTML it checks a hidden field in the form that was submitted and determines if this is a submission request. Now the page sends the information received from the form to the database by the use of a Visual Basic component called ExAir.Member. The component returns a value to the page to approve the Account Number/Password combination or to reject it. Based on this, the page either redirects the user to the Frequent Flyer Homepage, or displays a message explaining that the password was invalid.

How to Logon

If you have just started using the Exploration Air sample site, there is only one account setup. Here are the details:

Name: Katie Jordan Account: 10001 Password: password

Data Model

The Member table of the database stores unique Account Numbers and their passwords. This is the only data accessed from the login page.

Components Used

The ExAir component has a class called Member which handles all information retrieval from the Member table of the database. The CheckPassword method of the Member class is called. Three parameters are sent to this method: information on the location of the database, the account number, and the password. CheckPassword returns a value of 1 if the password was correct and 0 if incorrect. The page then uses this information to redirect if appropriate.

The following image shows what the component looks like when it is installed in the Microsoft Transaction Server snap-In for Microsoft Management Console:

ExAir.Member in Microsoft Transaction Server

ExAir Component in the Microsoft Management Console Snap-In

Transaction Usage

The CheckPassword method of the Member class contains transaction code. If this method encounters an error while trying to check the password in the database, then the transaction is aborted.



©1997 Microsoft Corporation. All rights reserved. Terms of Use.