| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello everyone.
Ok now i am not sure if what i am trying to achive is done by css or asp code. what i am trying to do is when data is outputed on a page that has a repeat region set to a table. How do i get the rows to show in diffrent colours, eg. 1st row the baground is blue than second is green than third is blue again and so on Please help..thanx |
|
#2
|
||||
|
||||
|
ASP3.0 / XHTML1.1
Code:
<table>
<% Dim booOdd
booOdd = True
Do Until rsWhatever.EOF Or rsWhatever.BOF
If booOdd Then %>
<tr class="odd">
<% booOdd = False
Else If booOdd = False Then %>
<tr class="even">
<% booOdd = True
End If %>
<td><%= rswhatever("fieldnamegoeshere") %></td><td><%= rswhatever("anotherfieldnamegoeshere") %></td>
</tr>
<% rsWhatever.Movenext
Loop %>
</table>
CSS Code:
tr.odd { background: blue; }
tr.even { background: green; }
|
|
#3
|
|||
|
|||
|
wow that is an intresting method , you learn something new everyday..
Thanx allot, i appreciate your effort and time!!, Nothing but love.. |
|
#4
|
||||
|
||||
|
Quote:
Ooookay, even though it only took me 30 seconds. |
![]() |
| Viewing: ASP Free Forums > Web Design > Web Layout > Form CSS |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|