All Topics  
Active Server Pages

 

   Email Print
   Bookmark   Link






 

Active Server Pages



 
 
Active Server Pages (ASP), also known as Classic ASP, was Microsoft
Microsoft

Microsoft Corporation is a multinational corporation computer technology corporation that develops, manufactures, licenses, and supports a wide range of computer software products for computing devices....
's first server-side
Server-side scripting

Server-side scripting is a web server technology in which a user's request is fulfilled by running a script directly on the web server to generate dynamic web pages....
 script engine
Active Scripting

Active Scripting is the technology used in Microsoft Windows to implement component-based scripting support. It is based on Component Object Model and allows installation of additional scripting engines in the form of COM modules....
 for dynamically-generated web pages
Dynamic web page

Classical hypertext navigation occurs among "static" documents, and, for "web users," this experience is reproduced using static web pages. However, Web browser can also provide an "interactive experience" that is termed "dynamic." Content on a web page can change, in response to different contexts or conditions....
. Initially released as an add-on to Internet Information Services
Internet Information Services

Internet Information Services - formerly called Internet Information Server - is a set of Internet-based services for servers created by Microsoft for use with Microsoft Windows....
 (IIS) via the Windows NT 4.0 Option Pack
Windows NT 4.0

Windows NT 4.0 is a Preemption , Graphical user interface and business-oriented operating system designed to work with either uniprocessor or Symmetric multiprocessing computers....
, it was subsequently included as a free component of Windows Server (since the initial release of Windows 2000 Server).

Developing rich functionality in ASP website
Website

A Web site is a collection of related Web pages, images, videos or other digital assets that are hosted on one Web server, usually accessible via the Internet....
s is enabled by the active scripting
Active Scripting

Active Scripting is the technology used in Microsoft Windows to implement component-based scripting support. It is based on Component Object Model and allows installation of additional scripting engines in the form of COM modules....
 engine's support of the Component Object Model
Component Object Model

Component Object Model is an interface standard for software componentry introduced by Microsoft in 1993. It is used to enable interprocess communication and dynamic object creation in a large range of programming languages....
 (COM), with each object
Object (computer science)

In its simplest embodiment, an object is an allocated region of storage. Since programming languages use variable#Computer_programmings to access objects, the terms object and variable are often used interchangeably....
 providing a related group of frequently-used functions and data attributes.






Discussion
Ask a question about 'Active Server Pages'
Start a new discussion about 'Active Server Pages'
Answer questions from other users
Full Discussion Forum



Encyclopedia


Active Server Pages (ASP), also known as Classic ASP, was Microsoft
Microsoft

Microsoft Corporation is a multinational corporation computer technology corporation that develops, manufactures, licenses, and supports a wide range of computer software products for computing devices....
's first server-side
Server-side scripting

Server-side scripting is a web server technology in which a user's request is fulfilled by running a script directly on the web server to generate dynamic web pages....
 script engine
Active Scripting

Active Scripting is the technology used in Microsoft Windows to implement component-based scripting support. It is based on Component Object Model and allows installation of additional scripting engines in the form of COM modules....
 for dynamically-generated web pages
Dynamic web page

Classical hypertext navigation occurs among "static" documents, and, for "web users," this experience is reproduced using static web pages. However, Web browser can also provide an "interactive experience" that is termed "dynamic." Content on a web page can change, in response to different contexts or conditions....
. Initially released as an add-on to Internet Information Services
Internet Information Services

Internet Information Services - formerly called Internet Information Server - is a set of Internet-based services for servers created by Microsoft for use with Microsoft Windows....
 (IIS) via the Windows NT 4.0 Option Pack
Windows NT 4.0

Windows NT 4.0 is a Preemption , Graphical user interface and business-oriented operating system designed to work with either uniprocessor or Symmetric multiprocessing computers....
, it was subsequently included as a free component of Windows Server (since the initial release of Windows 2000 Server).

Developing rich functionality in ASP website
Website

A Web site is a collection of related Web pages, images, videos or other digital assets that are hosted on one Web server, usually accessible via the Internet....
s is enabled by the active scripting
Active Scripting

Active Scripting is the technology used in Microsoft Windows to implement component-based scripting support. It is based on Component Object Model and allows installation of additional scripting engines in the form of COM modules....
 engine's support of the Component Object Model
Component Object Model

Component Object Model is an interface standard for software componentry introduced by Microsoft in 1993. It is used to enable interprocess communication and dynamic object creation in a large range of programming languages....
 (COM), with each object
Object (computer science)

In its simplest embodiment, an object is an allocated region of storage. Since programming languages use variable#Computer_programmings to access objects, the terms object and variable are often used interchangeably....
 providing a related group of frequently-used functions and data attributes. In ASP 2.0 there were six built-in objects: Application, ASPError, Request, Response, Server, and Session. Session, for example, is a cookie-based
HTTP cookie

HTTP cookies, more commonly referred to as World Wide Web cookies, tracking cookies or just cookies, are parcels of text sent by a Web server to a Web Client and then sent back unchanged by the client each time it accesses that server....
 session
Session (computer science)

In computer science, in particular computer network, a session is a semi-permanent interactive information exchange, also known as a dialogue, a conversation or a meeting, between two or more communicating devices, or between a computer and user ....
 object that maintains the state of variable
Variable

A variable is a symbol that stands for a value that may vary; the term usually occurs in opposition to constant, which is a symbol for a non-varying value, i.e....
s from page to page. Functionality is further extended by objects which, when instantiated, provide access to the environment of the web server
Web server

The term web server can mean one of two things:# A computer program that is responsible for accepting Hypertext Transfer Protocol requests from clients , and Server them HTTP responses along with optional data contents, which usually are web pages such as Hypertext Markup Language documents and linked objects ....
; as an example FileSystemObject (FSO
FSO

FSO may stand for:* Fabryka Samochod?w Osobowych, a Poland passenger car company* Federal Protective Service of Russia responsible for the security of Russian state officials....
) is used to create, read, update and delete files
Computer file

A computer file is a block of arbitrary information, or resource for storing information, which is available to a computer program and is usually based on some kind of durable computer storage....
.

Web pages with the .asp file extension use ASP, although some Web sites disguise their choice of scripting language for security purposes (e.g. still using the more common .htm or .html extension). Pages with the .aspx extension are ASP.NET
ASP.NET

ASP.NET is a web application framework developed and marketed by Microsoft to allow programmers to build dynamic web sites, web applications and web services....
 (based on Microsoft's .NET Framework
.NET Framework

The Microsoft .NET Framework is a software framework that is available with several Microsoft Windows operating systems. It includes a large Library of coded solutions to prevent common programming problems and a virtual machine that manages the execution of programs written specifically for the Software framework....
) and compiled, which makes them faster and more robust than the than server-side scripting
Server-side scripting

Server-side scripting is a web server technology in which a user's request is fulfilled by running a script directly on the web server to generate dynamic web pages....
 in ASP which is interpreted at run-time; however, many ASP.NET pages still include some ASP scripting. Such marked differences between ASP and ASP.NET have lead to the term Classic ASP being used, which also implies some nostalgia for the simpler platform.

Most ASP pages are written in VBScript
VBScript

VBScript is an Active Scripting language, developed by Microsoft, which uses the Component Object Model to access elements of the environment within which it's running ....
, but any other Active Scripting
Active Scripting

Active Scripting is the technology used in Microsoft Windows to implement component-based scripting support. It is based on Component Object Model and allows installation of additional scripting engines in the form of COM modules....
 engine can be selected instead by using the @Language directive or the <script language="language" runat="server"> syntax. JScript
JScript

JScript is the Microsoft dialect of the ECMAScript scripting language specification.JavaScript , JScript, and ECMAScript are very similar languages....
 (Microsoft's implementation of ECMAScript
ECMAScript

ECMAScript is a scripting language, standardized by Ecma International in the ECMA-262 Specification . The language is widely used on the World Wide Web, and is often confused with JavaScript or JScript, the two major Programming language dialect from which ECMAScript was standardized....
) is the other language that is usually available. PerlScript
PerlScript

PerlScript was initially solely an ActiveX Scripting Engine produced by the company ActiveState for use with Microsoft Internet Information Services that allows for programmers to use Perl-based code in addition to, or in place of, VBScript or JScript in the context of web servers running the Active Server Pages protocol....
 (a derivative of Perl
Perl

In computer programming, Perl is a high-level programming language, List of programming languages by category, Interpreter , dynamic programming language....
) and others are available as third-party installable Active Scripting engines.

History

Based on the dbWeb and iBasic tools, created by Aspect Software Engineering, ASP was one of the first web application development environments that integrated web application execution directly into the web server, 9 months after the release of NeXT's (now Apple) WebObjects
WebObjects

WebObjects is a Java platform web application server from Apple Inc., and a web application framework that runs on the server. It is available, at no additional cost, as part of the Xcode included with Apple's Mac OS X operating system....
. This was done in order to achieve high performance compared to calling external executable programs or CGI
Common Gateway Interface

The Common Gateway Interface is a Standardization Protocol for interfacing external application software with an Server , commonly a web server....
 scripts which were the most popular method for writing web applications at the time. Today there are additional platforms for web application development that are more common on other operating systems. Both JavaServer Pages
JavaServer Pages

JavaServer Pages is a Java technology that allows software developers to create dynamic web page, with HTML, XML, or other document types, in response to a Web client request....
 and PHP
PHP

PHP is a scripting language originally designed for producing dynamic web pages. It has evolved to include a command line interface capability and can be used in Standalone software Graphical user interface....
 are more commonly found on webservers running non-Microsoft operating systems, with PHP
PHP

PHP is a scripting language originally designed for producing dynamic web pages. It has evolved to include a command line interface capability and can be used in Standalone software Graphical user interface....
 currently being the more common of the two. Also of note is ColdFusion
ColdFusion

ColdFusion is an application server and software language used for Internet application development such as for dynamic web page. In this regard, ColdFusion is a similar product to Microsoft Active Server Pages, JavaServer Pages or PHP....
, a popular Adobe Systems
Adobe Systems

Adobe Systems Incorporated is an United States computer Computer software company headquartered in San Jose, California, USA. The company has historically focused upon the creation of multimedia and creativity software products, with a more-recent foray into rich Internet application software development....
 platform running on several operating systems (including Microsoft servers).

Prior to Microsoft's release of ASP for IIS 3, programmers relied on IDC
IDC

IDC is an initialism that can stand for:...
 and HTX files combined with ODBC drivers to display and manipulate dynamic data and pages running on IIS. The basics of these file formats and structures were used, at least in part, in the implementation of the early versions of ASP.

Halcyon InstantASP (iASP) and Chili!Soft ASP are third-party products that run ASP on platforms other than the Microsoft Windows operating systems. Neither alternative to real ASP fully emulates every feature, and may require additional components with which traditional ASP has no issues, such as database connectivity. MS access database support is a particular issue on non-Windows systems.

iASP is able to use the VBScript and JScript languages unlike Chili!Soft ASP which uses JScript. Microsoft's ASP can use both and has the potential to have other languages make use of the scripting engine. iASP was written in Java, and as such will run any almost any operating system. iASP appears be no longer available or at least hard to find.

Examples of other languages available are Perl and TCL, although they are not as widely known or used for ASP scripting. There is an Apache Webserver mod that runs an ASP-like Perl script language.

Chili!Soft was purchased by Sun Microsystems and later renamed "Sun ONE Active Server Pages", then later renamed to "Sun Java System Active Server Pages". Chilisoft ASP was written in C/C++ and is tied rather tightly to specific web server versions. According to Sun "Sun Java System Active Server Pages has entered its End Of Life".

Sample usage

Any scripting languages compatible with Microsoft's Active Scripting
Active Scripting

Active Scripting is the technology used in Microsoft Windows to implement component-based scripting support. It is based on Component Object Model and allows installation of additional scripting engines in the form of COM modules....
 standard may be used in ASP. The default scripting language (in classic ASP) is VBScript
VBScript

VBScript is an Active Scripting language, developed by Microsoft, which uses the Component Object Model to access elements of the environment within which it's running ....
:

<% Response.Write "Hello World!" %>

Or in a simpler format

<%= "Hello World!" %>

The examples above print "Hello World!" into the body of an HTML document.

Here's an example of how to connect to an Access Database <% Set oConn = Server.CreateObject("ADODB.Connection") oConn.Open "DRIVER=; DBQ=" & Server.MapPath("DB.mdb") Set rsUsers = Server.CreateObject("ADODB.Recordset") rsUsers.Open "SELECT * FROM Users", oConn %>

External links