Formatering ad ASP
HejHvordan får jeg denne kode sat ind i en tabel ?
<form METHOD="POST" ACTION="test.asp">
<p> </p>
</form>
<%
set rs = server.createobject("Adodb.connection")
rs.open conn
sql = "select * from nyheder order by id desc"
set rs = rs.execute(sql)
response.write "<table><form method=""post"" action=""admin.asp"">"
response.write "<tr><td>Overskrift</td><td>Dato:</td><td>ret</td><td>Synlig</td></tr>"
while not rs.eof
response.write "<tr><td>"
response.write rs("overskrift")
response.write "</td><td>"
response.write rs("nyheden")
response.write "</td><td>"
response.write rs("af")
response.write "</td><td>"
response.write rs.fields("dato")
response.write "</td><td>"
response.write "<a href=""admin.asp?mode=edit&id=" & rs.fields("id") & """>Ret</a>"
response.write "</td><td>"
response.write "</td><td>"
if rs.fields("vis") = True then
vis = "checked"
else
vis = ""
end if
response.write "<input type=""checkbox"" name=""chk" & rs.fields("id") & """ " & vis & ">"
response.write "</td></tr>"
rs.movenext
wend
response.write "<tr><td colspan=""5"" align=""right"">"
response.write "<input type=""submit"" name=""vises""></form>"
rs.close
set rs = nothing
end if
%>