Table of Contents

ASP Notes

writing text

<%
response.write("Hello World!")
%>
 
<%
response.write("<h2>You can use HTML tags to format the text!</h2>")
%>
 
<%
response.write("<p style='color:#0000ff'>This text is styled with the style attribute!</p>")
%>

creating and using a variable

<%
dim name
name="Donald Duck"
response.write("My name is: " & name)
%>

creating an array

<%
Dim famname(5),i
famname(0) = "Jan Egil"
famname(1) = "Tove"
famname(2) = "Hege"
famname(3) = "Stale"
famname(4) = "Kai Jim"
famname(5) = "Borge"
 
For i = 0 to 5
      response.write(famname(i) & "<br />")
Next
%>

For loop (with HTML Headers)

<%
dim i
for i=1 to 6
   response.write("<h" & i & ">Header " & i & "</h" & i & ">")
next
%>