ASP how to create a table

1

Currently this is my ASP code, but I have no idea how I could create a table that divides the ID and Name of the cars

<%

if isArray(listaTipo) then
for i = lbound(listaTipo ,2) to ubound(listaTipo ,2)
    response.write ( "ID->"& listaTipo(0,i) &" + Nombre: "& listaTipo(1,i) 
 &"<br /><br />")
  next'i
 else
response.write ("<div class='alert' >")
response.write ("No existen registros de tipos de autos")
response.write ("</div>")
end if

%>

Currently my data looks like this.

    
asked by Daniela 06.11.2018 в 21:46
source

1 answer

2

you can create it with the response.write

if isArray(listaTipo) then
     Response.Write("<table><tr><td>ID</td><td>Nombre</td></tr>")
     for i = lbound(listaTipo ,2) to ubound(listaTipo ,2)             
          response.write ("<tr><td>"& listaTipo(0,i) &"</td><td>"& listaTipo(1,i) &"</td></tr>")
     next
     Response.Write("</table>")
 else
     response.write ("<div class='alert' >")
     response.write ("No existen registros de tipos de autos")
     response.write ("</div>")
end if

I hope it's helpful

    
answered by 06.11.2018 / 22:04
source