Explanation of the roster application

In planning an application with server-side interaction, one should envision it being used. The application will present various screens and the user will navigate them by clicking on buttons or hyperlinks and will enter information into forms.

Four ways to pass information between pages are:

  1. Place it in a global variable with session-wide scope; retrieve with Session.value("<variable name>")
  2. Place it in a query string following the URL; retrieve with Request.querystring("<field name>")
  3. Place it in a form; retrieve with Request.form ("<field name>")
  4. Store it in a database; retrieve by reading the database
Our roster application consists of six script pages: init.asp, roster_view.asp, new_student.asp, write_new.asp, student_del_confirm.asp, and student_del.asp. These are described below, and you can see the documentation for each by clicking on the script name.

Script Explanation Transitions
init.asp Create a global variable called "DBOpen." DBOpen holds a command string specifying the database driver and location. It is retrieved in other scripts if they open the database file. This script does not display anything, but transitions to roster_view.asp after initializing DBOpen. Unconditional transition to roster_view.asp
roster_view.asp Display the roster using current database data.
  • If the user clicks delete: student_del_confirm.asp
  • If the user clicks add new student: new_student.asp
new_student.asp This is a pure HTML form for new student field values. It contains no executable code. Note that a table is used inside the form to line up the captions and textboxes.
  • If the user clicks Return To Roster: roster_view.asp
  • If the user clicks Save Changes: write_new.asp
write_new.aspIf the user enters a complete record, this script adds it to the database and transitions to roster_view. If there is missing data, it displays an error message and buttons for transition to either roster_view or new_student.
  • If form is complete: unconditional transition to roster_view.asp
  • If data is missing and the user clicks Return To Roster: roster_view.asp
  • If data is missing and the user clicks Add a New Student: new_student.asp
student_del_confirm.asp This script displays the name from the record to be deleted, and asks the user to confirm that action.
  • If the user clicks Return To Roster: roster_view.asp
  • If the user clicks Delete: student_del.asp
student_del.asp This script deletes record rID after the user confirms the action. It does not display anything, but transitions to roster_view.asp after deleting the record from the database. Unconditional transition to roster_view.asp


Disclaimer: The views and opinions expressed on unofficial pages of California State University, Dominguez Hills faculty, staff or students are strictly those of the page authors. The content of these pages has not been reviewed or approved by California State University, Dominguez Hills.