FrontPageHowTo.com - FrontPage help & tutorials
Alternate table row colors in DBR...

This example shows you how to alternate the table row color in your Database Results Region. It was submitted to us by Doug Miller...
 

By changing the display code, you are able to better highlight a new line of records by adding color to the table row. See an example of this in use at our Internet Resources page: resources.asp>>

Locate the first database row <td> tag in HTML view:

<!--webbot bot="DatabaseRegionStart" i-CheckSum="44985" endspan -->
<tr>
<td><!--webbot bot="DatabaseResultColumn" startspan

Insert the following code just before the <td> tag:

<%
Dim x, bgcolor
 if x = 1 then
     bgcolor="gray" 
     x=2
Else
    bgcolor="White"
    x=1
End if %>
<td >

Locate each row <td> tag

bot="DatabaseResultColumn" i-CheckSum="30557" endspan -->
</td>
<td>
<!--webbot bot="DatabaseResultColumn" startspan

Change each tag to read:

<td bgcolor='<%=bgcolor%>'>

 

 

This site was built and is maintained by DJ Web Works.
© 2000. All rights reserved.
Microsoft and FrontPage2000 are registered trade marks of Microsoft Corporation.

Hit Counter