Active Server Pages
(ASP), also known as Classic ASP or ASP Classic, was Microsoft's
first server-side script engine
for dynamically generated web pages.
Initially released as an add-on to Internet Information Services (IIS) via
the Windows NT 4.0 Option Pack (ca. 1998), it was
subsequently included as a free component of Windows Server (since the initial
release of Windows 2000 Server). ASP.NET
has superseded ASP.
ASP 2.0 provided six built-in
objects: Application, ASPError, Request,
Response, Server, and Session.
Session,
for example, represents a session that maintains the state of variables from page to page.
The Active
Scripting engine's support of the Component Object Model (COM) enables ASP websites
to access functionality in compiled libraries such as DLLs .
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 enabled buffering by default and optimized
the engine for better performance.
The use of ASP pages with Internet Information Services (IIS) is
currently supported on all supported versions of IIS.
Web pages with the .asp file extension use ASP, although some web sites
disguise their choice of scripting language for security purposes.
Pages with the .aspx extension use compiled ASP.NET
(based on Microsoft's .NET Framework), which makes them faster and
more robust than server-side scripting in ASP, which is
interpreted at run-time, however, ASP.NET pages may still include some ASP
scripting.
What is an ASP File?
- An ASP file is just the same as an HTML file
- An ASP file can contain text, HTML, XML, and scripts
- Scripts in an ASP file are executed on the server
- An ASP file has the file extension ".asp"
How Does ASP Differ from HTML?
- When a browser requests an HTML file, the server returns the file
- When a browser requests an ASP file, IIS passes the request to the ASP engine. The ASP engine reads the ASP file, line by line, and executes the scripts in the file. Finally, the ASP file is returned to the browser as plain HTML
You can run ASP on your own PC.
- Your own PC can act as a web server if you install IIS or PWS
- IIS or PWS turns your computer into a web server
- Microsoft IIS and PWS are free web server components
After you have installed IIS or PWS
follow these steps:
- Look for a new folder called Inetpub on your hard drive
- Open the Inetpub folder, and find a folder named wwwroot
- Create a new folder, like "MyWeb", under wwwroot
- Write some ASP code and save the file as "test1.asp" in the new folder
- Make sure your Web server is running (see below)
- Open your browser and type "http://localhost/MyWeb/test1.asp", to view your first web page
“Hello world!” asp program.
<!DOCTYPE html>
<html>
<body>
<%
response.write("My first ASP script!")
%>
</body>
</html>
<html>
<body>
<%
response.write("My first ASP script!")
%>
</body>
</html>
No comments:
Post a Comment