(6 ratings)   
By: msconline.maconstate.edu
In order to activate ASP components and to use its objects, one or more scripts are placed on the Web page along with the HTML codes specifying how the generated information is to be formatted for display in the browser. These scripts are written in...
Added: 25 June 2008    Views: 1227  
PathComputers    Programming    Asp
Keywords: computers   programming   language   asp   database   functions   code   coder   server   side  
Do you like this tutorial? Now you can support our team to add more :     
 
 
 

Coding ASP Scripts

In order to activate ASP components and to use its objects, one or more scripts are placed on the Web page along with the HTML codes specifying how the generated information is to be formatted for display in the browser. These scripts are written in the VBScript language and are contained inside the special symbols <% and %> to indicate their presence to the server:

<%
This is an ASP script
%>


ASP pages can be coded with a simple text editor such as Notepad, or you can use WordPad if you remember to save your pages as .asp text documents rather than formatted .doc documents. It is preferable to use special HTML editors such as Macromedia HomeSite or the excellent, free editor 1st Page 2000 that is available from www.evrsoft.com. These editor provide multiple-page editing, color coding of scripts, and other, automated editing features for ease and clarity of coding.

Running ASP Scripts

Web pages containing scripts must be saved with the special file extension .asp to inform the server that this is a scripted page. When the ASP page is retrieved by the server, it is not sent directly to the browser as is the case with normal .htm pages. Instead, the page is routed to the ASP processing routine (asp.dll) where the scripts on the page are run and the information produced by the scripts is generated.

The server "composes" an HTML page for return to the user, inserting the information generated by the scripts within the HTML formatting. The end result is a page composed entirely of HTML and text information where much, if not all, of the text information has been generated by the scripts. If you view the source listing of the returned page in the browser, you see only the final results of processing. You do not see any of the scripts contained on the original page.

Scripted pages (.asp pages) must be run under the http protocol. This means that you cannot open these pages as files in your browser and view the results as you can with standard .htmmust be run from a server and accessed with a URL beginning with http://... pages. Pages

About the Author :
msconline.maconstate.edu
Server-side Scripting
Articles and Tutorials Directory by www.learnfobia.com
 Rate this tutorial : Rate 1Rate 2Rate 3Rate 4Rate 5
  |    Add to Favorites
  |    Send to Friend
  |    Print
Comments