The Wayback Machine - https://web.archive.org/all/20041212031135/http://www.aspphptutorials.com:80/ASP/introduction.php


ASP Tutorials
Arrays
Cookies
Date & Time
Display Text
Do While
For Next
If Then ElseIf
Introduction
Select Case
Variables
 
PHP Tutorials
Date & Time
Display Text
Do While
For Loop
If Else
Switch Case
Variables
 
Directory
ASP
Beginner
Intermediate
Advanced

PHP
Beginner
Intermediate
Advanced
 

ASP Tutorials
 
 

Introduction to ASP

ASP (abbreviation for Active Server Pages) is a technology developed by Microsoft to build dynamic and data driven web pages. ASP works as a server-side page and produces HTML output to the client. The ASP technology itself is not a programming language, an ASP page can be written with either of the two scripting languages: VBScript (Visual Basic Script) or JScript (Microsoft's implementation of JavaScript). VBScript is widely chosen among the programmers, mostly because of the ease of the language syntax. The language used in an ASP page should be stated in the first line with this code:
<% @Language=VBScript %>

This code is not required if you're using VBScript as your ASP language, as it's the default scripting language in ASP.

Running an ASP page has three requirements:

1. Windows NT or later
2. IIS (Internet Information Services)
3. .asp file extension for the pages

IIS is a web server software developed by Microsoft and it requires Windows NT or later to run. There is also a light-weight application called PWS (Personal Web Server) ,which is also by Microsoft, to run ASP pages on Windows 98. PWS running on Windows 98 and IIS running on Windows XP Professional are limited to 10 simultaneous connections, which makes them useful for only development usages. There's also a server software by ChiliSoft! for Linux systems to run ASP pages but it supports only ASP 2.0, which is outdated against the latest ASP version, ASP 3.0.

An ASP page can have two types of code:

1. ASP code
2. HTML code

To write ASP code in a page requires an identifier to tell the server "I have started to write ASP code". This can be done using two different identifiers:
<% (start tag)
%> (end tag)

or
<script language="VBScript/JScript" runat="server"> (start tag) </script> (end tag)

The former one is mostly used because of the ease of coding. Here's an ASP version of the famous "Hello World" code:
<html>
<head>
<title>My Page</title>
</head>
<body>

<% 'ASP code block starts

Response.Write "Hello World!"

'ASP code block ends
%>
</body>
</html>

The output of this code is like this:
Hello World

The ASP code block can be anywhere on the page. It could be before or after HTML code. Also, having HTML code is not a necessity. The whole page could have only ASP code.