Professional Documents
Culture Documents
Introduction
Are you sick of static HTML pages? Do you want to create dynamic web pages? Do you
want to enable your web pages with database access? If your answer is “Yes”, ASP might
be a solution for you. In May 2000, Microsoft estimated that there are over 800,000ASP
developers in the world (1). You may come up with a question what the heck ASP is.
Don’t worry. After reading this paper, you will know what it is, how it works and what it
can do for you. Are you ready? Let’s get to know ASP together.
What is ASP?
ASP stands for Active Server Pages. Microsoft introduced Active Server Pages in
December 1996, beginning with Version 3.0. Microsoft officially defines ASP as:
“Active Server Pages is an open, compile-free application environment in which you can
combine HTML, scripts, and reusable ActiveX server components to create dynamic and
powerful Web-based business solutions. Active Server pages enables server side scripting
for IIS with native support for both VBScript and Jscript.” (2). In other words, ASP is a
Microsoft technology that enables you to create dynamic web sites with the help of server
side script, such as VBScript and Jscript. ASP technology is supported on all Microsoft
Web servers that are freely available. If you have Window NT 4.0 Server installed, you
can download IIS (Internet Information Server) 3.0 or 4.0. If you are using Window
2000, IIS 5.0 comes with it as a free component. If you have Window 95/98, you can
download Personal Web Server (PWS), which is a smaller version of IIS, from Window
95/98 CD. You can also download these products for free from Microsoft’s web site.
Well, you have learned what the ASP technology is. Next, you will learn about an
An ASP file is quite like an HTML file. It contains text, HTML tags and scripts,
which are executed on the server. The two widely used scripting languages for an ASP
page are VBScript and JScript. VBScript is pretty much like Visual Basic, whereas
scripting language for ASP (3). Besides these two scripting languages, you can use other
scripting language with ASP as long as you have an ActiveX scripting engine for the
The difference between an HTML file and an ASP file is that an ASP file has the
“.asp” extension. Furthermore, script delimiters for HTML tags and ASP code are also
different. A script delimiter is a character that marks the starting and ending of a unit.
HTML tags begins with lesser than (<) and greater than (>) brackets, whereas ASP script
typically starts with <% and ends with %>. In between the delimiters are the server-side
scripts.
To write an ASP script, you don’t need any additional software because it can be
written with any HTML editor, such as Notepad. Nonetheless, if you feel bored with the
plain text and would like to use some special software, you can use Microsoft visual
InterDev, which helps you to easily create an ASP page by giving you nice highlights and
I hope that you already have an idea of what an ASP file is and how it is different
from an HTML file. In the next step, you will learn how ASP works. Let’s go.
How does it work?
As you have learned, scripts in an ASP file are server-side scripts, which means that the
scripts are processed on the server and then the result of the scripts will be converted to
HTML before sending to the web browser. To illustrate, let’s take a look at this table to
compare the process of retrieving an HTML page and an ASP page (5).
1. A user requests a web page (i.e., 1. A user requests a web page (i.e.,
http://www.utexas.edu/index.html http://www.devasp.com/test.asp
2. The browser finds the appropriate 2. The browser finds the appropriate
web server, and asks for the web server (like IIS or PWS), and
3. The web server locates the required 3. The web server locates the required
page and sends it back to the page, and parses out the ASP code
4. The browser executes the client side 4. The browser executes the client side
results results
As you can see, the whole process of the two is quite similar. Since ASP is a server-side
technology, the required page is executed on the server before the HTML is created and
served to the client. To make it clearer, Figure1 shows the processing behind a browser
Object /
Component ASP Engine ASP Script
Oracle
Provider
Call for ADO
SQL Driver (ActiveX Data Object)
Server
Access
ADO
ODBC
FoxPro
For example, a client types in a URL into your browser. The browser requests the
ASP page from the web server. The server proceeds the file with “.asp” extension to ASP
Engine in which Objects or ActiveX Components can be used to extend the web server
weather in a specific area. Thus, a different page is generated according to the area
specified and time that the page is accessed. Then, the server generates HTML tags
before sending it back to the client. Therefore, when you view the source of an ASP file,
you will not see any different from a standard HTML file.
• Request – to get information from the user that is passed along with an HTTP
request
You have already known how ASP technology works. Isn’t it fascinating? You
probably want to know how to make it work and what you need to make it work. In the
First of all, you need to set up an environment where you can execute your
scripts; that is you need to set up your web server (IIS or PWS). If you have an NT
Server, IIS is already installed for you. If you Window 95/98, you can install PWS from
the add-ons directory on the Win 98 CD. If you are using UNIX, you can Chili!Soft
(www.chilisoft.com) instead of Microsoft web server. Next, you will need to install some
database software, such as MS Access, Microsoft SQL Server (in case you want to
connect to database).
Last but not least, you need an ASP editor. It can be any text editor, like NotePad
or Microsoft Visual InterDev. To create an ASP file, you may need to know a scripting
language, such as VBScript or JScript. If you want to deal with a database, you also need
to have some knowledge about database, such as creating a Data Source Name (DSN),
creating a recordset. You can learn more about database access from this web site:
http://www.builder.com/Programming/ASPIntro/ss06.html
While learning about ASP technology in previous sections, you might ask
yourself all the time what it can do for you. Certainly, ASP must have some strength;
otherwise, it won’t be popular as such. Let’s count on its strong points and functionality.
1. Dynamic web page – Since ASP supports scripting languages, which run on the
web server, your web page can be dynamically created. For example, you can
create your web page so as to greeting each user when they log into your page
differently.
2. Browser independent – ASP is browser independent because all the scripting code
runs on the server. The browser only gets the results from the server in a standard
HTML page.
ASP enables you to easily build rich database functionality into your web site,
application development. For example, you can use Request object to retrieve
5. Free availability – Yes, it’s free. You can download web server (IIS or PWS) for
free from Microsoft’s web site. You don’t even have to have any special tool to
write an ASP file. In other words, you can simply use any text editor, like
NotePad.
Conclusion
pages. With its build-in objects and ActiveX components, ASP developers can create a
dynamic web page and make use of database access. Now that you have basic knowledge
about ASP, it is better to have a hands-on experience, which is the best way to learn to
learn how to write an ASP file. There are tons of ASP tutorials out there on the Web. You
can also find some tutorials included at the end of this paper. Enjoy and good luck!
Reference
2. ASP Overview
http://msdn.microsoft.com/workshop/server/asp/aspover.asp
3. Introduction to ASP.DevASP
http://www.devasp.com/samples/asp.asp