Monday, December 17, 2007

How to make a simple ASP program

How to make a simple ASP program


I N T R O D U C T I O N

A web developer can build interactive and personalized web pages with Active Server Pages (ASP), a key component of Microsoft’s dynamic web content strategy, for their web sites or corporate intranet without having to understand the internals of a web server or complicated application programming interfaces.

A web browser can request scripts just as if it were requesting an HTML file. The difference is these ASP files contain Active Server Page script, usually in the form of VBSCRIPT or JSCRIPT, and have a file extension of .ASP. When requested, these scripts execute in the Active Server Page environment instead of being simply returned to the browser and produce output for sending back to the requesting browser.

S T E P - 1

You can write your first ASP program file by opening a text editor, such as WordPad or Notepad, which is the most simple tool to get started with ASP programming task.

S T E P - 2

All ASP codes must be written inside the <%... %>, for example:

<% Response.write("

This is your first ASP page

") %>

S T E P - 3

Save the document to "first.asp"

S T E P - 4

Upload or copy the ASP file to the web directory of a running Microsoft web server, such as Internet Information Server (IIS) or Personal Web Server (PWS), which will be used to execute the ASP program. You must locate the ASP file at the Web Root Directory (such as wwwroot directory) so that the ASP program can be accessible through hypertext transfer protocol (http).

Make sure the web server is properly installed and run in computer. For more information about this, please refer to the user guide of the web server software.

Then open the ASP file by using a web browser. Type in the web path of the ASP file under the web root directory of a server.

For example: http://boston/asp/01.asp

while 'boston' is a name of the web server, [asp] is the folder containing '01.asp' file.

Below is the output screen of the ASP program as seen on a web browser:

In the following topics, you will find around 70 topics with examples that teach you to use and run ASP program with ease.

No comments: