That was posted 4 times :-(
 
Anyway, yes, there is a way. If you have a counter in your loop you can
use the mod operator to determine whether it's on an even or odd
numbered row and change the colour accordingly.
 
For instance :-
 
dim iCounter, i, strColour
 
iCounter = 1
 
Response.write "<table>" & VbCrLf
for i = 0 to 20
    if iCounter mod 2 = 0 then
        strColour = "#FF0000"
    else
        strColour = "#00FF00"
    end if
    response.write "<tr><td style=""background-color: " & strColour &
";"">Row " & iCounter & "</td></tr>" & VbCrLf
    iCounter = iCounter + 1
next
Response.write "</table>" & VbCrLf
 
Dan

________________________________

From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of D.Suresh
Sent: 13 May 2005 12:05
To: [email protected]
Subject: [AspClassicAnyQuestionIsOk] table color


hai all,
iam doing a project(adderess boook) in asp iam displaying redcords from 
my database it's coming correctly but i want to display it color the 
color should in alternate is there any solutions 




________________________________

Yahoo! Groups Links


*       To visit your group on the web, go to:
        http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
          
*       To unsubscribe from this group, send an email to:
        [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]
subscribe> 
          
*       Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service <http://docs.yahoo.com/info/terms/> . 




[Non-text portions of this message have been removed]



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to