Espero que te sirva , yo muestro nombres de categoria tres por filas y si la fila tiene 1 o 2 las reyeno con
Código:
<table>
<tr>
<td colspan="2"> <font size="2" face="Arial, Helvetica, sans-serif">
<%
'la sentencia sql
set rs_categoria=createobject("ADODB.Recordset")
categoria = "SELECT * FROM categoria ORDER BY nombre"
rs_categoria.open categoria,connae
if not rs_categoria.eof then
contador = 0
cont_reg = 0
while not rs_categoria.EOF
nombre_categoria = rs_categoria("nombre")
if contador = 0 then
response.Write("<table width=98% cols=3 border=0>")
response.Write("<tr>")
end if
if contador < 3 then
response.Write("<td width=166><input name=check_c"&cont_reg&" type=checkbox value="&id_categoria&">"&nombre_categoria&"</td>")
end if
contador = contador + 1
if contador = 3 then
response.Write("</tr>")
response.Write("</table>")
contador = 0
end if
cont_reg = cont_reg + 1
rs_categoria.MoveNext
wend
if contador <> 0 then
for i= 0 to 3-contador
response.Write("<td width=33> </td>")
next
response.Write("</tr>")
response.Write("</table><br>")
end if
end if%>
</font>
</td>
</tr>
</table>