469,645 Members | 1,150 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,645 developers. It's quick & easy.

Write out results of record set



I have a record set that I can successfully write out to an asp page.
My manager would like the reports to have alternate row colors for the
report tables (i.e. rows 1, 3, 5, 7, 9, etc have white background and
rows 2, 4, 6, 8, 10, etc have a green background). Any ideas on how to
do it? I am sure it has to do with the *tr* tag, but not quite sure how
to work it.

Thanks.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #1
1 1563
var row = 0;

// put something like the following in your recordset loop

if (row++ % 2)
Response.Write('<tr bgcolor="white">');
else
Response.Write('<tr bgcolor="green">');


"PorkyJr" <no****@nospam.net> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...


I have a record set that I can successfully write out to an asp page.
My manager would like the reports to have alternate row colors for the
report tables (i.e. rows 1, 3, 5, 7, 9, etc have white background and
rows 2, 4, 6, 8, 10, etc have a green background). Any ideas on how to
do it? I am sure it has to do with the *tr* tag, but not quite sure how
to work it.

Thanks.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by lorirobn | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.