E-Content of
INTERNET TECHNOLOGY AND WEB DESIGN
Chapter : 10.2 Interactive Tools
Topic : 10.2.2 Active Server Pages (ASP)
Active Server pages (ASP)
• Active Server Pages (ASP), also known as classic ASP or ASP Classic,
which 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, it was subsequently included as a free
component of windows server (since the initial release of windows 2000
server).
• Active Server Pages (ASP) is a web oriented technology for creating
dynamic web pages.
• ASP is a Microsoft technology, and it works by allowing us the
functionality of a programming language.
• User writes programming codes that will generate the HTML for the Web
page dynamically.
• So, whenever a user browses to their web site and requests one of our
ASP pages, the ASP code is processed at that time by a special piece of
software-web server.
• This processing generate the HTML, which is then passed to the
browser and used to create the page itself, on the user's screen.
• Active Server Pages are text files that can contain not only text and
HTML tags as in standard web document but also commands contain
not only text and HTML tags as in standard web document but also
commands written in a scripting language that can be carried out on the
server.
Page | 5
E-Content of
INTERNET TECHNOLOGY AND WEB DESIGN
• All Active Server pages saved with an .asp extension and can be
accessed like standard URLs through a web browser such as Microsoft
Internet explorer or Netscape Navigator.
• The power of ASP lies in two facts
First, the HTML is not created until the user wants to see the web
page.
Second it does not care what the browser is being used for.
• To run ASP on a computer following softwares are required.
Requirements Software
In order to write ASP pages Need a text editor or other web
development tools such as Microsoft
Visual Studio 6.
In order to publish the pages Need a web server that supports ASP.
Internet information Server 5.0 is one of
the servers which supports ASP version
3.0 and is installed as part of windows
2000 Operating System.
In order to view and test the pages Need a web browser. It can be any
standard web browser that it available in
the market.
FIG 10.1: Software Requirement to run ASP
• ASP.Net use scripting languages, which are responsible to perform
operations in ASP pages.
• Sample Usage
Any scripting languages compatible with Microsoft's Active Scripting
standard may be used in ASP.
Page | 6
E-Content of
INTERNET TECHNOLOGY AND WEB DESIGN
The default scripting language is VB Script.
Example of "Hello World" in VB Script.
<html>
<body>
<%Response Write “Hello World”%>
</body>
</html>
Or in a simpler format
<html>
<body>
<%= “Hello World”%>
</body>
</html>
The above examples 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 = (Microsoft Access Driver (*, mdb)); DBQ = "& Server MapPath
(DB.mdb")
Set rsUsers = Server.CreateObject ("ADODB.RecordSet")
rsUsers.Open "SELECT *FROM Users", oConn
%>
Page | 7