Home Tutorials IT Jobs Source Codes Certifications Discussion Forum
  Python Tutorials
Introduction
ASP - Setup
ASP - Running
ASP - First Script
Syntax
ASP - VBScript
ASP - Javascript
ASP - Operators
If Statement
Select
Variable
Array
Session
Cookies
String
Forms
Forms Get
Forms Post
Email Form
ASP Object
ASP Components
ASP Comments
Special Characters
DLL
ADO
ASP File
ASP Date
   IT Jobs
Software Jobs
Networking Jobs
   Model Question Papers
BE Computer Science
MCA
BCA
Others
 
   

ASP Syntax

If you have any experience with PHP, Javascript, or general programming then ASP's syntax will make some sense to you. However, if you only have experience with web technologies like HTML and CSS, then ASP will be more of a challenge.

ASP Syntax: Wrappers

Just how HTML uses tags to create web pages, ASP needs tags to create dynamic web sites. These tags do not resemble the typical tags used in HTML, so be sure you notice the difference between tags used for ASP and tags used for HTML. Below is the ASP script we used in the previous lesson.

ASP Code:

<html>
<body>
<%
Response.Write("Hello Me")
%>
</body>
</html>

ASP - Tags

These special tags <% and %> will always encapsulate your ASP code. Some things about the ASP tag that sets it apart from normal HTML tags:

  • An opening ASP tag is <% while an HTML tag normally looks like <tagname>
  • A closing ASP tag looks like %> while an HTML tag normally looks like </tagname>
  • ASP code can occurr anywhere, even within an HTML tag opening tag like this:

ASP Code:

<a href="<% Response.Write("index.asp") %>">Home</a>

Display:

Home

 

<< Previous | Next >>

Home  |  About us  | Privacy  |  Disclaimer  |  Contact us |  Advertise with us | Our Link Partners
All Rights Reserved 2009, CodeTeller.com