Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Highlighting Table Rows

Status
Not open for further replies.

rosebud289

Programmer
Jan 13, 2005
25
0
0
US
I am retrieving info from a database into a table. How can I highlight every other row in the table for the number of records displayed? Thanks!
 
If you are building the table from a Recordset you could do this:

Code:
<Table>
<%
Do While Not oRS.EOF 
  if (strColor = "f8f8f8") then
    strColor = "eeeeee"
  else
    strColor = "f8f8f8"
  end if
%>				
  <tr>
    <td bgcolor="<%= strColor%>">
      <%= oRS("Field1")%> &nbsp;
    </td>
    <td bgcolor="<%= strColor%>">
      <%= oRS("Field2")%> &nbsp;
    </td>
  </tr>
<%
  oRS.MoveNext
Loop
%>
</Table>
 
From the search tab above: thread333-792152

barcode_1.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top