ASP/VBScript delimiters

ASP code is opened and closed with the use of delimiters.
When you are going to write ASP code use the opening tag <% and when you have finished writing your code use the closing tag %>

Note for our purposes it isn't important that you understand the following code example:

<% If request.form("name") <>"michael" then
response.write "your name is not michael"
End if %>

the delimiters do not need to be on the same line, the following code is the same as the above

<%
If request.form("name") <>"michael" then
response.write "your name is not michael"
End if
%>

To print out code use <%=  or  response.write

<%= "michael" %>

or

<% response.write "michael" %>

You will notice a similarity between the use of these delimiters and the opening < and > closing tags in HTML, well atleast I hope you do! :-)

Advertisements



MembersPro

MembersPro PayPal - ASP Membership software

Plug and play ASP membership script that integrates with PayPal to let you charge recurring membership fees.

Get your best asp web hosting provider now and save 25%