I'm trying to figure out how to write ASP code. I know I should enclose everything in the <% %> symbols but what about head tags? I have the following code, can someone tell me what should be in the <% and what shouldn't.
<HEAD>
<TITLE>To Do Listing</TITLE>
</HEAD>
<BODY>
<%
Option Explicit
Response.Expires = 0
Dim con, objRS, strconnect
Set con = Server.CreateObject ("ADODB.Connection"
con.Open "DSN=ToDoList;UID=;PWD=;"
strconnect = "Select * From TASK"
Set objRS = con.Execute(strconnect)
Response.Write ("<b>List of people stored in the Personnel table are listed below:</b>"
Response.Write ("<p>"
Response.Write "<TABLE>"
While Not objRS.EOF
Response.Write "<TR>"
Response.Write "<b>" & "<TD>" & objRS("TASK_USER"
& _
" " & "</TD>" & "<TD>" & objRS("TASK_NAME"
& "</TD>" & "</b>"
Response.Write ("<BR>"
objRS.MoveNext
Response.Write "</TR>"
Wend
Response.Write "</TABLE>"
objRS.close
con.Close
Set objRS = Nothing
Set con = Nothing
%>
</BODY>
<HEAD>
<TITLE>To Do Listing</TITLE>
</HEAD>
<BODY>
<%
Option Explicit
Response.Expires = 0
Dim con, objRS, strconnect
Set con = Server.CreateObject ("ADODB.Connection"
con.Open "DSN=ToDoList;UID=;PWD=;"
strconnect = "Select * From TASK"
Set objRS = con.Execute(strconnect)
Response.Write ("<b>List of people stored in the Personnel table are listed below:</b>"
Response.Write ("<p>"
Response.Write "<TABLE>"
While Not objRS.EOF
Response.Write "<TR>"
Response.Write "<b>" & "<TD>" & objRS("TASK_USER"
" " & "</TD>" & "<TD>" & objRS("TASK_NAME"
Response.Write ("<BR>"
objRS.MoveNext
Response.Write "</TR>"
Wend
Response.Write "</TABLE>"
objRS.close
con.Close
Set objRS = Nothing
Set con = Nothing
%>
</BODY>