BILKENT UNIVERSITY  
CS533 Information Retrieval Systems  
Technical Presentation Web Site
Barýþ UZ
 
Index of
this page
Introduction
Push Technologies
Channels
CGI
ASP
Java
Streaming Media
 
What is ASP?
Writing ASP Scripts
Using Scripting Languages
Getting Information from a User
Sending Information to a User
Develoing ASP-Based Applications
ASP Main Page with Tutorial and 
Selected Links
 
What is an .asp File? 

An ASP file can contain any combination of 

    Text 
    HTML Tags 
    Script Commands
It is a pure text file. Just rename the .htm or .html extension to .asp and place the file in a web publishing directory whose execution permissions enabled. 

What is a Script? 

A script is a series of commands. A script can perform the following: 

    Assign a value to a variable 
    Instruct the Web server to send something, such as the value of a variable, to a browser. An instruction that sends a value to a browser is an output expression. 
    Combine commands into procedures. A procedure is a named sequence of commands and statements that acts as a unit.
ASP Syntax 

ASP is not a scripting language, it provides an environment that processes scripts that you incorporate into your HTML pages. To use ASP successfully, you need to learn the syntax of ASP. 

Delimiters 

HTML uses "<" and ">" symbols. Similarly, ASP uses <% and %> to enclose script commands. For example, the command <% sport = "climbing" %> assigns the value climbing to the variable sport. 

Single Expressions 

You can include within ASP delimiters any expression that is valid for your primary scripting language. 

Statements 

A statement is a syntactically complete unit that expresses one kind of action, decleration, or definition. 

Including HTML in a Statement 

You can include HTML text between the sections of a statement. For example: 

<FONT COLOR="GREEN"> 
<% If time > = #12:00:00 AM# And Time < #12:00:00 PM# Then %> 
Good Morning! 
<% Else %> 
Hello! 
<% End If %> 
</FONT> 

Script Tags 

The statements, expressions, commands and procedures that you use within script delimiters must be valid for your default primary scripting language. ASP is shipped with the default primary scripting language is set to VBScript. However, any scripting language can be used by using <SCRIPT> and </SCRIPT> tags together with LANGUAGE and RUNAT attributes. 

Other Facilities 

ASP allows you to perform a lot of important functions which are described in ASP Main Page. 
For example, you can include other files to use in your procedures.  

Although ASP is used primarily to process server-side scripting, we can extend its capabilities by using it to generate client-side scripts that are then processed by the client browser. ASP does this by combining client-side scripts that are enclosed by HTML comments with server-side scripts that are enclosed by delimiters. 
 

 
PREVIOUS TOPIC
UP
(First page of this topic)
NEXT TOPIC
PREVIOUS PAGE 
(of this topic)
NEXT PAGE 
(of this topic)