Active Server Pages
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages)
3.0 / February 17, 2000
Web application framework
Active Server Pages (ASP) is Microsoft's first server-side scripting language and engine for dynamic web pages.
It was first released in December 1996, before being superseded in January 2002 by ASP.NET.
Initially released as an add-on to
- ASP 1.0 was released in December 1996 as part of IIS 3.0
- ASP 2.0 was released in September 1997 as part of IIS 4.0
- ASP 3.0 was released in November 2000 as part of IIS 5.0
ASP 2.0 provides six built-in
ASP 3.0 does not differ greatly from ASP 2.0 but it does offer some additional enhancements such as Server.Transfer method, Server.Execute method, and an enhanced ASPError object. ASP 3.0 also enables buffering by default and optimized the engine for better performance.
ASP was supported until 14 January 2020 on Windows 7. The use of ASP pages will be supported on Windows 8 for a minimum of 10 years from the Windows 8 release date. ASP is currently[when?] supported in all available versions of IIS.
<script language="language" runat="server" />syntax or server configuration can be used to select the language. In the example below, Response.Write Now() is in an HTML
|Server side||Client Side|
The server's current time: <% Response.Write Now() %>
The server's current time: 8/11/2015 6:24:45 PM
Web pages with the .asp filename extension use ASP, although some web sites disguise their choice of scripting language for security purposes by using the more common .htm or .html extensions. Pages with the .aspx extension use compiled ASP.NET; however, ASP.NET pages may still include some ASP scripting. The introduction of ASP.NET led to use of the term Classic ASP for the original technology.
Sun Java System ASP (formerly ChiliSoft ASP) was a popular and reportedly complete emulator, but it has been discontinued.
The Server object
The server object allows connections to databases (ADO), filesystem, and use of components installed on the server.
<% Dim oAdoCon, oAdoRec, oAdoStm, oCdoCon, oCdoMsg, oSciDic, oSciFsm, oMswAdr Set oAdoCon = Server.CreateObject("ADODB.Connection") Set oAdoRec = Server.CreateObject("ADODB.Recordset") Set oAdoStm = Server.CreateObject("ADODB.Stream") Set oCdoCon = Server.CreateObject("CDO.Configuration") Set oCdoMsg = Server.CreateObject("CDO.Message") Set oSciDic = Server.CreateObject("Scripting.Dictionary") Set oSciFsm = Server.CreateObject("Scripting.FileSystemObject") Set oMswAdr = Server.CreateObject("MSWC.Swingbridge") %>
The Application object
This object stores global variables, which are variables accessible to all users.
<% Application("Ali") = "My ASP Application" Response.Write "Welcome to " & Server.HTMLEncode(Application("Ali")) & "!" %>
The Session object
Stores variables accessible only to a single visitor, which are local variables.
<% If Len(Request.QueryString("name")) > 0 Then Session("name") = Request.QueryString("name") End If Response.Write "Welcome " & Server.HTMLEncode(Session("name")) & "!" %>
The session object is file based and multiple concurrent read and/or write requests will be blocked and processed in turn.
The Err object
Allows the management and fixing of non-fatal errors.
<% On Error Resume Next Response.Write 1 / 0 ' Division by zero If Err.Number <> 0 Then Response.Write "Error Code: " & Server.HTMLEncode(Err.Number) & "<br />" Response.Write "Error Source: " & Server.HTMLEncode(Err.Source) & "<br />" Response.Write "Error Description: " & Server.HTMLEncode(Err.Description) & "<br />" Err.Clear End If %>
- Template processor
- Comparison of web template engines
- Jakarta Server Pages
- Common Gateway Interface
- HTTP Cookie. Source: ASP and Web Session Management, Microsoft
- ^ a b "Active Server Pages (ASP) support in Windows". Support (4.0 ed.). Microsoft. 30 January 2012. Retrieved 11 August 2015.
- ^ Source: , Microsoft
- ISBN 978-1-4493-7959-9. Retrieved 9 October 2013.