Nice, or use a class:

css:

.tableBG0{
BACKGROUND-COLOR: #3F9F9F;}
.tableBG1{
BACKGROUND-COLOR: #9F9F9F;
}

asp:
response.write "<tr class=""tableBG" & intRow mod 2 & """>"

Mark
-----Original Message-----
From: Chris Tifer [mailto:[EMAIL PROTECTED]]
Sent: vrijdag 30 augustus 2002 17:43
To: ActiveServerPages
Subject: Re: Displaying results


The easiest way we handle this is to set an array, such as:

DIM arrBGColors(1)
arrBGColors(0) = "#FFFFFF"
arrBGColors(1) = "#DDDDDD"

Then, while looping through your results, you use the MOD
operator to choose which array's value will be used as the
BG Color:

FOR intRow = 0 TO 10
    ' Use arrBGColors(intRow MOD 2) to get the proper color
NEXT

No if statement needs to be used for this.

Chris Tifer
http://www.emailajoke.com


----- Original Message -----
From: "Robert Swiger" <[EMAIL PROTECTED]>
To: "ActiveServerPages" <[EMAIL PROTECTED]>
Sent: Thursday, August 29, 2002 1:55 PM
Subject: Displaying results


> I want to display rows of results from a db search but I want one row's
> background color to be white and the other to be light gray. How can I do
> this?
>
> Rob Swiger
> Webmaster
> TCRH.org
>
> Twin County Regional Healthcare
> Information Systems
> 200 Hospital Drive, Galax, VA  24333
> PH: 276.238.3515
> FX: 276.236.2660
> http://www.tcrh.org
> [EMAIL PROTECTED]
>
> GO HOKIES!!!!!!!!
> Confidentiality Notice:  This email message, including any attachments, is
> for the sole use of the intended recipient(s) and may contain confidential
> and privileged information.  Any unauthorized review, use, disclosure or
> distribution is prohibited.  If you are not the intended recipient, please
> contact the sender by reply email and destroy all copies of the original
> message.
>
> ---
> You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to
%%email.unsub%%
>


---
You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
To unsubscribe send a blank email to %%email.unsub%%

---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to