CodeToad Forums » ASP » How can i have different colors on a table that uses data from a database?
|
|
|
Here what I have:
A ASP page using VBScript, that accesses a database with company names, then i take the info onto my page and out it in a table. Now my questions is how can i display the info from the database with rotating background colors for the table rows? Any help would be great. Thanks
|
|
|
Hey,
I used the following to achieve the results I think you are looking for.
I dim'd variables called bground1 and bground2.
the when the table was made below I response.write'd the variables in place of the colors, i.e.,
<tr>
<td bgcolor="<%response.write bground1%>">
<font color="<%response.write fcolordesc%>">Industry:</font>
<%response.write "Precast"%>
</td>
</tr>
ignore the Industry and Precast words, they are specific to the site I was building.
hope this helps.
best,
mark
|
|
|
|
|
|
|
|
|
|