Alternating table colors? **Resolved**
This is actually an ASP ?, but the code'll be the same, so I'm posting here-
I've got a table that is created dynamically, and I want the rows to have an alternating background color-
I'm thinking that in my loop that creates the rows, I need to have a switch of some sort-Like it goes through the loop, with a backgrd color of 1, gets to the end of the processing for that part of the loop, and set a var from 1 to 0-Next time the loop goes through, the bckgrd color is 0, and at the end set from 0 to 1. Just can't seem to figure out how.
An if statement? If 1, the set to 0?
I'll try that (sucks when you think of a solution as you type the ? :) ) but if anyone has any better suggestions I'd love to hear them.
Thanks
Update===
if intRowColor = 0 Then
Response.Write "<TR bgcolor=""#ddddfc"">"
intRowColor = 1
Else
Response.Write "<TR bgcolor=""#ffffff"">"
intRowColor = 0
End if
Works:)