Simple row coloring
The fastest way to do alternate colors of rows in your table (from recordset or something)
Original Author: Rammi
Code
<html> .lnFalse { Set objRs = Server.CreateObject("ADODB.RecordSet") Do Until objRs.EOF --------------------------------------------
<head>
<title>Alternate rows
color</title>
</head>
color=#000066><style>
.lnTrue {
background :
Gray;
}
background :
Silver;
}
</style>
<body>
<table>
<tr>
<th>Test</th>
</tr>
<%
Dim
objRs, blnLine
objRs.Open "SOME QUERY
HERE", "Connection string"
blnLine =
False
Response.Write color=#000066>"<tr class=""ln" & blnLine & """>"
& _
"<td>" & objRs(0) &
"</td></tr>"
blnLine =
Not(blnLine)
objRs.MoveNext
Loop
Set objRs
= Nothing
%>
</table>
</body>
</html>
Blue bold parts are the most
important...
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.