<% if kol1 = "checked" then response.write '<td bgcolor="#eeeeee" bordercolorlight="#aaaaaa" bordercolordark="#ffffff" align="center"><font face="verdana" size="1"><%=rs2("uk1")%></font></td>' end If
if kol2 = "checked" then response.write '<td bgcolor="#eeeeee" bordercolorlight="#aaaaaa" bordercolordark="#ffffff" align="center"><font face="verdana" size="1"><%=rs2("uk2")%></font></td>' end If
if kol3 = "checked" then response.write '<td bgcolor="#eeeeee" bordercolorlight="#aaaaaa" bordercolordark="#ffffff" align="center"><font face="verdana" size="1"><%=rs2("uk3")%></font></td>' end If
if kol4 = "checked" then response.write '<td bgcolor="#eeeeee" bordercolorlight="#aaaaaa" bordercolordark="#ffffff" align="center"><font face="verdana" size="1"><%=rs2("uk4")%></font></td>' end If
if kol5 = "checked" then response.write '<td bgcolor="#eeeeee" bordercolorlight="#aaaaaa" bordercolordark="#ffffff" align="center"><font face="verdana" size="1"><%=rs2("uk5")%></font></td>' end If
</tr>
<% rs2.movenext loop rs2.close %>
</table>
<% conn.close set conn = nothing set sqlstmt = nothing %>
<% if kol1 = "checked" then response.write '<td bgcolor="#eeeeee" bordercolorlight="#aaaaaa" bordercolordark="#ffffff" align="center"><font face="verdana" size="1"><%=rs2("uk1")%></font></td>' end If
if kol2 = "checked" then response.write '<td bgcolor="#eeeeee" bordercolorlight="#aaaaaa" bordercolordark="#ffffff" align="center"><font face="verdana" size="1"><%=rs2("uk2")%></font></td>' end If
if kol3 = "checked" then response.write '<td bgcolor="#eeeeee" bordercolorlight="#aaaaaa" bordercolordark="#ffffff" align="center"><font face="verdana" size="1"><%=rs2("uk3")%></font></td>' end If
if kol4 = "checked" then response.write '<td bgcolor="#eeeeee" bordercolorlight="#aaaaaa" bordercolordark="#ffffff" align="center"><font face="verdana" size="1"><%=rs2("uk4")%></font></td>' end If
if kol5 = "checked" then response.write '<td bgcolor="#eeeeee" bordercolorlight="#aaaaaa" bordercolordark="#ffffff" align="center"><font face="verdana" size="1"><%=rs2("uk5")%></font></td>' end If
</tr>
<% rs2.movenext loop rs2.close %>
</table>
<% conn.close set conn = nothing set sqlstmt = nothing %>
<% if kol1 = "checked" then response.write '<td bgcolor="#eeeeee" bordercolorlight="#aaaaaa" bordercolordark="#ffffff" align="center"><font face="verdana" size="1"><%=rs2("uk1")%></font></td>' end If
if kol2 = "checked" then response.write '<td bgcolor="#eeeeee" bordercolorlight="#aaaaaa" bordercolordark="#ffffff" align="center"><font face="verdana" size="1"><%=rs2("uk2")%></font></td>' end If
if kol3 = "checked" then response.write '<td bgcolor="#eeeeee" bordercolorlight="#aaaaaa" bordercolordark="#ffffff" align="center"><font face="verdana" size="1"><%=rs2("uk3")%></font></td>' end If
if kol4 = "checked" then response.write '<td bgcolor="#eeeeee" bordercolorlight="#aaaaaa" bordercolordark="#ffffff" align="center"><font face="verdana" size="1"><%=rs2("uk4")%></font></td>' end If
if kol5 = "checked" then response.write '<td bgcolor="#eeeeee" bordercolorlight="#aaaaaa" bordercolordark="#ffffff" align="center"><font face="verdana" size="1"><%=rs2("uk5")%></font></td>' end If
</tr>
<% rs2.movenext loop rs2.close %>
</table> </center> <br><br>
<% conn.close set conn = nothing set sqlstmt = nothing %>
<% if kol1 = "checked" then response.write '<td bgcolor="#eeeeee" bordercolorlight="#aaaaaa" bordercolordark="#ffffff" align="center"><font face="verdana" size="1"><%=rs2("uk1")%></font></td>' end If
if kol2 = "checked" then response.write '<td bgcolor="#eeeeee" bordercolorlight="#aaaaaa" bordercolordark="#ffffff" align="center"><font face="verdana" size="1"><%=rs2("uk2")%></font></td>' end If
if kol3 = "checked" then response.write '<td bgcolor="#eeeeee" bordercolorlight="#aaaaaa" bordercolordark="#ffffff" align="center"><font face="verdana" size="1"><%=rs2("uk3")%></font></td>' end If
if kol4 = "checked" then response.write '<td bgcolor="#eeeeee" bordercolorlight="#aaaaaa" bordercolordark="#ffffff" align="center"><font face="verdana" size="1"><%=rs2("uk4")%></font></td>' end If
if kol5 = "checked" then response.write '<td bgcolor="#eeeeee" bordercolorlight="#aaaaaa" bordercolordark="#ffffff" align="center"><font face="verdana" size="1"><%=rs2("uk5")%></font></td>' end If
</tr>
<% rs2.movenext wend rs2.close %>
</table> </center> <br><br>
<% conn.close set conn = nothing set sqlstmt = nothing %>
<% if kol1 = "checked" then response.write '<td bgcolor="#eeeeee" bordercolorlight="#aaaaaa" bordercolordark="#ffffff" align="center"><font face="verdana" size="1"><%=rs2("uk1")%></font></td>' end If
<% if kol1 = "checked" then response.write '<td bgcolor="#eeeeee" bordercolorlight="#aaaaaa" bordercolordark="#ffffff" align="center"><font face="verdana" size="1">' & rs2("uk1") end If
if kol2 = "checked" then response.write '<td bgcolor="#eeeeee" bordercolorlight="#aaaaaa" bordercolordark="#ffffff" align="center"><font face="verdana" size="1">' & rs2("uk2") & '</font></td>' end If
if kol3 = "checked" then response.write '<td bgcolor="#eeeeee" bordercolorlight="#aaaaaa" bordercolordark="#ffffff" align="center"><font face="verdana" size="1">' & rs2("uk3") & '</font></td>' end If
if kol4 = "checked" then response.write '<td bgcolor="#eeeeee" bordercolorlight="#aaaaaa" bordercolordark="#ffffff" align="center"><font face="verdana" size="1">' & rs2("uk4") & '</font></td>' end If
if kol5 = "checked" then response.write '<td bgcolor="#eeeeee" bordercolorlight="#aaaaaa" bordercolordark="#ffffff" align="center"><font face="verdana" size="1">' & rs2("uk5") & '</font></td>' end If %> </tr> <% RS.MoveNext WEND %>
</table> </center> <br><br>
<% conn.close set conn = nothing set sqlstmt = nothing %>
Vil meget gerne forklare hvad det var der var galt. du havde følgende kode:
<% if kol1 = "checked" then response.write '<td bgcolor="#eeeeee" bordercolorlight="#aaaaaa" bordercolordark="#ffffff" align="center"><font face="verdana" size="1"><%=rs2("uk1")%></font></td>' end If
Du har startet med <% som fortæller at det efterfølgende er ASP kode, men her går det galt: <%=rs2("uk1")%> du "forsøger" at fortælle fortolkeren at du vil bruge ASP kode igen, UDEN at afslutte først, derfor ændrede jeg koden til: & rs2("uk1") &
selv tak, takker for point. Afhængig af IIS versionen, er der en performance gevinst ved at samle ASP koden i så store klumper som muligt, så fortolkeren ikke skal kontekst-switche så meget......(tror IIS version 5+ klarer det bedre, så hvis du bruger en windows 2000 server (eller professional), kan du bare se bort fra denne kommentar.
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.