Forum Moderators: open
I ran into a little bit of a problem.
i am writing from a db into a table on a webpage. the db can be updated, when items are added to the Db, the table expandeds.
i want to, when the table expands, store 3 td tags on one line and for the expanded bit to populate a line below it.
i am using a count to count the td tags, doesn't seem to work.
here is the code :
<%
count = 0
do while not rs.eof
count = count + 1
%>
<% If count = 0 then
Response.Write"<td width=""33%"">"
Response.Write"<p align=""center"">"
Response.Write"<b><font size=""2"" face=""Verdana"">"
Response.Write"<a href=""vehicle.asp?Vehicle="%>
<% =rs("vehicleCatID") %>
<%Response.Write""">"%><% =rs("vehicleCatName") %>
<%Response.Write"</a></font></b></td>"
ElseIf count = 2 then
Response.Write"<td width=""33%"">"
Response.Write"<p align=""center"">"
Response.Write"<b><font size=""2"" face=""Verdana"">"
Response.Write"<a href=""vehicle.asp?Vehicle="%><% =rs("vehicleCatID") %>
<% Response.Write" "">" %><% =rs("vehicleCatName")%>
<% Response.Write"</a></font></b></td>"%>
<%
End If
rs.movenext
loop
%>
Is there any other way to do this?
Somebody suggested the "mode" command or something like that. Can anybody tell me what this is?
thanks
Help!
count = 0
do while not rs.eof
count = count + 1
If count = 0 then
I don't see anything in the routine that would ever set (count) back to 0. (count) = (count) + 1 ensures that (count) will never = 0 while in the loop.
This code...
ElseIf count = 2 then