| |
| |
| |
An Introduction to ASP and VBScript | |
| |
| |
Introduction A very brief history | |
| |
| |
How the Web works | |
| |
| |
A few problems with Web development | |
| |
| |
Getting around some of the problems | |
| |
| |
Scripting A brief introduction to IIS objects | |
| |
| |
VBScript Programs | |
| |
| |
Variables Declaring variables | |
| |
| |
Variable names | |
| |
| |
Assigning values to variables | |
| |
| |
Arithmetic operations | |
| |
| |
A very simple Active Server Pages example | |
| |
| |
Data sub-types and data conversion functions | |
| |
| |
Making decisions | |
| |
| |
The IF statement | |
| |
| |
IF-ELSE-END IF | |
| |
| |
Relational operators | |
| |
| |
Logical operators | |
| |
| |
Logical functions | |
| |
| |
A simple validation example If-elseif-end if | |
| |
| |
A more detailed example | |
| |
| |
A final word on variable names | |
| |
| |
One Last Sample Program | |
| |
| |
Exercises | |
| |
| |
| |
The Response Object and Lots More VBScript Query Strings | |
| |
| |
The QueryString Collection More on the Response Object | |
| |
| |
The Response buffer Manipulating the Response buffer | |
| |
| |
Response end Response redirection | |
| |
| |
An Example Error messages and debugging | |
| |
| |
VBScript Functions and Formats Int and Fix Round Abs and Sqr | |
| |
| |
FormatNumber, FormatCurrency, FormatPercent | |
| |
| |
Argument Format and Function Example | |
| |
| |
Loops For Loops | |
| |
| |
Nested For Loops | |
| |
| |
String Functions | |
| |
| |
Do While Loop | |
| |
| |
String Processing | |
| |
| |
Example Date and Time Functions | |
| |
| |
Exercises | |
| |
| |
| |
Developing an Application with Arrays and Sub-Procedures | |
| |
| |
Web Applications Multiple Pages A stateless environment | |
| |
| |
A Sample Visual Basic Application | |
| |
| |
Problems porting the application to the Web | |
| |
| |
A Web-based Login and User Data application - Version 1 Part 1 Login.asp Part2 Main.asp Part 3Update.asp | |
| |
| |
Arrays A Sample Application Using Arrays Sub-Programs | |
| |
| |
User defined sub-procedures A very simple sub-procedure | |
| |
| |
Another simple sub-procedure User defined functions | |
| |
| |
Two Dimensional Arrays A function using a two-dimensional array | |
| |
| |
A Web-based Login and User Data application, Version 2 Problems with Version 1 | |
| |
| |
The new approach Two documents, multiple paths | |
| |
| |
The revised Login.asp combined with Main.asp | |
| |
| |
A sub-procedure to generate the login form Using the sub-procedure where needed Passing data to the revised Update.asp The Revised Update.asp | |
| |
| |
Exercises | |
| |
| |
| |
Cookies, Applications and Sessions Cookies | |
| |
| |
Overview | |
| |
| |
Setting Cookies | |
| |
| |
Using Cookies | |
| |
| |
A Web based Login and User Data applicationVersion 3 With Cookies Login3.asp Update3.asp | |
| |
| |
A final note on Cookies Applications and the Application Object | |
| |
| |
Definition of a Web Application Duration of a Web Application | |
| |
| |
The Application Object Global.asa Sessions and Session Objects Sessions | |
| |
| |
The Session Object Sessions and Global.asa Working with the Session Object | |
| |
| |
A Sample Application using the Application and Session Objects | |
| |
| |
The application's global.asp file Calculating and displaying the results | |
| |
| |
A Web based Login and User Data application - Version 4 with Session variables | |
| |
| |
The login Server-Side Includes The update | |
| |
| |
Exercises | |
| |
| |
| |
Database Access | |
| |
| |
Introduction Databasics ODBC ASP and Database Access | |
| |
| |
The Connection object | |
| |
| |
The RecordSet Object | |
| |
| |
A Guest Book Example Adovbs inc Opening a Recordset Database cursors Lock type | |
| |
| |
Adding a new record to a Recordset | |
| |
| |
Updating a Recordset | |
| |
| |
Closing the Recordset and Connection Reading the Guest Book | |
| |
| |
Opening a Recordset - no cursor or lock type specified Looping through a Recordset with a known number of columns Reading the Guest Book, Version 2 Some problems referencing record set data by name | |
| |
| |
Referencing record set data by number Determining the number of fields in a record set | |
| |
| |
Looping through a Recordset with a unknown number of columns | |
| |
| |
Controlling data in a record set Dynamically creating an HTML SELECT list | |
| |
| |
The For Each loop Selecting fields to include in the record set | |
| |
| |
The Recordset Source property Filtering a record set Creating the sort criteria Setting the Recordset's sort property Opening the selected, sorted and filtered record set | |
| |
| |
Exercises | |
| |
| |
| |
More Database Relationships between objects and tables | |
| |
| |
One to One | |
| |
| |
One to Many | |
| |
| |
Many to Many | |
| |
| |
Implementing Relationships | |
| |
| |
Implementing a One to One relationship | |
| |
| |
Implementing a One to Many relationship | |
| |
| |
Implementing Many-to-Many relationships | |
| |
| |
Relational Integrity | |
| |
| |
Accessing Data from Related Tables | |
| |
| |
Using a Predefined Query | |
| |
| |
Using Data from one Table to find Data in Another Table | |
| |
| |
Two tables | |
| |
| |
Three tables | |
| |
| |
SQL join More about the SQL SELECT statement | |
| |
| |
Column Selection SQL functions (min, max, etc.) | |
| |
| |
Ordering Filtering (Where Clause) | |
| |
| |
Joins Error Trapping Transaction Processing | |
| |
| |
A Web based Login and User Data Application - Version 5 | |
| |
| |
Using Database Login5.asp Returning User | |
| |
| |
New User Update5.asp Exercises | |
| |
| |
Appendix AReserved Words | |