i’m trying to create running counter for SQL data in asp. For example,
Name
James
John
Mary
Instead I like to have it in
Name
- James
- John
- Mary
The code I have is this…
<%
if registerRS.recordcount > 0 Then
registerRS.movefirst
End If
%>
<table border=1 cellpadding=0 cellspacing=0>
<tr>
<th width="50" font class="tblhdr" style="width:400px;">Name</th>
<%
Do while not registerRS.eof
%>
<th width="50" font class="pgcont" valing=left style="width:400px;"> <%=registerRS.Fields("name")%></th>
<%
registerRS.movenext
loop
registerRS.close
set registerRS=nothing
End sub
%>
If you’re committed to using your table the following (untested) code should work, as Curt points out you could also use an
<ol>and avoid making changes to your code logic –