The below code breaks when I place a while not EOF in another while not EOF.
Is this illegal in ASP Classic code? How do I fix it?
<table cellspacing = "0" cellpadding = "3" class = "horiz ">
<tr>
<th width = "20%">Acronym</th>
<th width = "50%">Meaning</th>
<th width = "30%">Source</th>
</tr>
<%
count = 0
pletter = "z"
fletter = left(con("acronym"),1)
%>
<% while (NOT con.EOF) %>
<tr>
<td colspan = "3" ><h2><a name="A">A</a></h2></td>
</tr>
<% while (NOT con.EOF) %>
<tr>
<td><%=con("acronym")%></td>
<td><%=con("meaning")%></td>
<td><%=con("source")%></td>
</tr>
<%
con.MoveNext()
Wend
%>
<%
con.MoveNext()
Wend
%>
</table>
Why not have a single while loop. Add an if statement to determine if the first character has changed (E.g., from A to B). If the character changes, add a TR to display the character.