Simple row coloring
The fastest way to do alternate colors of rows in your table (from recordset or something)
AI
KI-Zusammenfassung: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Quellcode
<P><html><BR><head><BR><title>Alternate rows
color</title><BR></head><BR><FONT
color=#000066><STRONG><style><BR>.lnTrue {<BR> background :
Gray;<BR> }</STRONG></FONT></P>
<P><FONT color=#000066><STRONG>.lnFalse {<BR> background :
Silver;<BR> }<BR></style><BR></STRONG></FONT><body><BR><table><BR> <tr><BR> <th>Test</th><BR> </tr><BR><%<BR>Dim
objRs, blnLine</P>
<P>Set objRs = Server.CreateObject("ADODB.RecordSet")<BR>objRs.Open "SOME QUERY
HERE", "Connection string"<BR><BR><BR><FONT color=#000066><STRONG>blnLine =
False</STRONG></FONT></P>
<P>Do Until objRs.EOF<BR> Response.Write <STRONG><FONT
color=#000066>"<tr class=""ln" & blnLine & """>"
</FONT></STRONG>& _<BR> "<td>" & objRs(0) &
"</td></tr>"<BR> <STRONG><FONT color=#000066>blnLine =
Not(blnLine) </FONT></STRONG><BR> objRs.MoveNext<BR>Loop<BR>Set objRs
= Nothing<BR>%><BR></table><BR></body><BR></html></P>
<P>--------------------------------------------<BR>Blue bold parts are the most
important...</P>
Originalkommentare (3)
Wiederhergestellt von der Wayback Machine