VBScript Tutorials - Herong's Tutorial Examples - Version 5.20, by Dr. Herong Yang

What is ASP (Active Server Pages)?

This section describes the ASP (Active Server Pages) technology that allows you to write VBScript code inside HTML documents for the Web server, IIS, to execute. The VBScript code can provide dynamic contents into the final HTML document to be delivered to the client machine.

We have learned enough about client-side scripting with VBScript in previous chapters, Let's now look at server-side scripting with VBScript through the ASP technology.

ASP (Active Server Pages): Web pages that contains scripting statements executed by the Web server. The output of the scripting statements will be merged with the static parts of the page, and delivered to the browser as the response to the HTTP request initiated by the Web browser.

ASP is a technology, not a language. You can write the scripting statements in any language as long as the Web server can recognize them and execute them. The Microsoft Internet Information Server (IIS) 4.0 supports two scripting languages: Visual Basic Script (VBScript) and Java Script (JScript).

Non-ASP pages can also include scripting statements to be executed by the Web client, browser, not by the server.

An ASP enabled Web server can not only execute the embedded scripting statements, but it can also provides additional build-in objects and ability to access external objects. So there are 4 major areas the ASP technology can bring to your Web pages. We will discuss each of them in details in the following sections:

  • statements of the scripting language.
  • Built-in functions of the scripting language.
  • Web server built-in objects.
  • External DLL and DOM objects.

Here is a simple example of an ASP page with VBScript language, hello.asp:

<%@ language="vbscript"%>
<html><body>
<%
response.write("Hello world!")
%>
</body></html>

Table of Contents

 About This Book

 Introduction of VBScript - Visual Basic Scripting Edition

 Variant Data Type, Subtypes, and Literals

 Arithmetic Operations

 Numeric Comparison Operations and Logical Operations

 String Operations - Concatenation and Comparison

 Variable Declaration and Assignment Statement

 Expression and Order of Operation Precedence

 Statement Syntax and Statement Types

 Array Data Type and Related Statements

 Array References and Array Assignment Statements

 Conditional Statements - "If ... Then" and "Select Case"

 Loop Statements - "For", "While", and "Do"

 "Function" and "Sub" Procedures

 Built-in Functions

 Inspecting Variables Received in Procedures

 Error Handling Flag and the "Err" Object

 Regular Expression Pattern Match and Replacement

 scrrun.dll - Scripting Runtime DLL Library

 Creating Your Own Classes

 IE Web Browser Supporting VBScript

IIS ASP Server Supporting VBScript

What is ASP (Active Server Pages)?

 Static, Client-Side and Server-Side Scripting Pages

 Setting Up IIS to Run ASP Pages - asp.dll

 ASP Objects: Request, Response, Session and Application

 ASP Object Example - Passing Values between Pages

 Interacting with External Applications - ActiveX Data Object (ADO)

 WSH (Windows Script Host)

 References

 Printable Copy - PDF Version

What is ASP (Active Server Pages)? - Updated in 2015, by Dr. Herong Yang