Coding Basics

Code Delimiters

ASP code is embedded directly into the HTML file, along with the HTML code. In order to tell the server where the code is, use these delimiters: <% to start and %> to end.


Use these Coding Standards when writing code.

Writing Code

One way to write information to the HTML file being sent back is in multi-line code blocks using the Write method of the Response object (more on this later):

		Response.Write "Hello,"
		Response.Write "World!"

If you have only one line, you can use this shortcut method (note the equal sign on the opening delimiter, and that we don't need the Response.Write):

	<%= "Hello, World!" %>