Articles  
DevASP.NET for ASP.NET, VB.NET, XML and C# (C-Sharp) Developers Tuesday, March 03, 2009
Search Directory
ASP Directory
Xml Directory

FREE 12 month online training for ASP.NET & MS Expression Studio and a Free copy of MS Expression Web with Windows Server Purchase
An Introduction to ASP

Author: Asif

Active Server Pages is a programming environment that gives the ability to generate dynamic html pages with the help of server side scripting.

VBScript is the default scripting language for ASP, but if you like you can use VBScript, JScript, Perl or any other scripting language for server side scripting in an ASP page. An ASP page is almost the same as a HTM or HTML page... the only difference is that an ASP page has the '.asp' extension. Active Server Page can include both client side and server side scripts. In an ASP page VBScript is usually used as the server side and Java Script as the client side scripting language.

Do i need any special software to write ASP?
You don't need any special software to write an ASP page. An ASP page can be written with any HTML editor... even in Windows Notepad. If you are looking for some special software to write an ASP page, Microsoft Visual InterDev is the best tool for you. InterDev helps you to easily develop ASP applications because it simplifies the process of developing and debugging ASP applications.

Browser independent.
ASP is browser independent because all the scripting code runs on the server and the browser only gets a normal HTML page as a result of server side scripting.

How ASP work?

In Case of a HTM or HTML page.

•  A user requests a web page in the browser (i.e., 'http://www.devasp.com/test.htm')

•  Browser requests the required page from the server (like IIS or PWS).

•  Server reads the required file from memory or the file system and sends it back to the Browser.

•  Browser executes the client side scripting (i.e., Java scripts) and displays the results.

In case of Active Server Page.

•  A user requests a web page in the browser with a file extension .asp
    (i.e., 'http://www.devasp.com/test.asp')

•  Browser requests the page from the server (like IIS or PWS).

•  Server reads the required file from memory or the file system and recognizes that the file has
    an '.asp' extension.

•  Server sends that file to ASP.dll.

•  ASP.dll reads the file with the '.asp' extension from top to bottom and executes all the codes
    within the <% and %> tags and produces a standard HTML page.

•  The server sends that HTML page back to browser.

•  Browser executes the client side scripting (i.e., Java scripts) and displays the results to the
    user in the browser window.

Let us take a look at this simple ASP example to get a better idea how ASP works.

 

 

 

File: HelloWorld.asp

 

<head>
<title>Hello World</title>
</head>
<body>
<h2>
My First ASP Page.</h2>
<% For I = 1 To 5 %>
<font size="<%=I%>">Hello World </font>
<br>
<% Next %>
</body>
</html>

If you request this page in browser this is the result what you will see in the browser as output of this page.

 

 

 

 

Now if you check "View Source" behind this page you will see something like this.

 

What happend actually when you requests this page in web browser.
Server reads the file extension and recognize that this is an ASP file and need to execute before send back to browser. ASP.dll reads the file from top to bottom and the executes the code written in between <% and %> tags and browser only gets a result of that server side scripting.

 

 

 

Disclaimer - Privacy
© 2002-2014 DevASP.com