



(6 ratings)
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
20 Random Tutorials from the same category :
Counter in ASP
Recordset Access Methods
FORMAT SPECIAL DATA
ASP.NET 2 Special Purpose Folders
ASP.NET in Dreamweaver 8
GLOBAL.ASA IN ASP
Reading a Database
Using Application Variables
Installing ASP on your own computer
Displaying Server Values In ASP
AIM Profile Screenname Viewer as a component of AIM Profile Designs
The Recordset Object
SQL Access Methods In ASP
Passing Query Strings In Asp
ASP.NET Tutorial - Making image thumbnails
NEW WAY TO HANDLE VARIABLES
Text Editors and Software to Write ASP
String Functions
Reading form variables passed in the URL
Searching for Matching Values













