Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Re: HOw to?


Message #1 by "Chirag Shah" <chiragiit@y...> on Fri, 5 Apr 2002 23:10:08
something like this can be done...
 <% 
   Dim n
   n=0
   While Not rs.EOF 
   If Round(n / 2) * 2 = n then
 %>
 <tr>
    <td width="80%" bgcolor="#C0C0C0">&nbsp;<%= rs.fields("ID") %></td>
 </tr>
 
<% Else %>
 <tr> 
  <td width="11%" bgcolor="#FFFFFF">&nbsp;<%= rs.fields("ID") %></td>
 </tr>

 <%  
     END IF 
     n = n+1
     rs.MoveNext 
     Wend
  %>
Message #2 by "Craig Flannigan" <ckf@k...> on Fri, 5 Apr 2002 11:10:29 +0100
This is a multi-part message in MIME format.

------=_NextPart_000_0078_01C1DC92.7FC5F420
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

It's not vauge.

ASP. Place this within your Loop which builds the table
<%
 '-----------------------------------------------
 '--- Provides a alternate grey lines to a table
 '-----------------------------------------------

 If b=1 then
     BackCol = "#F4F4F4"
 Else
     BackCol = "#FFFFFF"
 End if

b=b+1
If b=2 then b=0
%>


HTML: Example
<td width="369" bgcolor="<%=BackCol%>" height="20">


Hope this helps
Craig.
  -----Original Message-----
  From: Earljon K. A. Hidalgo [mailto:earl@p...]
  Sent: 05 April 2002 11:13
  To: ASP Databases
  Subject: [asp_databases] RE: HOw to?


  Im sorry but I think my question is quite vague.
  My question is how can i display my table rows such that the color of the
rows is alternating (eg: gray and white) How can i manipulate this on my ASP
result page?

  Like this one:

        testing testing
        testing testing
        test test
        test test


  Thanks in advance
    ----- Original Message -----
    From: imran.saleem@b...
    To: ASP Databases
    Sent: Friday, April 05, 2002 5:08 PM
    Subject: [asp_databases] RE: HOw to?


    <TABLE BORDER=0>
    <TR BGCOLOR=white>
      -----Original Message-----
      From: Earljon K. A. Hidalgo [mailto:earl@p...]
      Sent: Friday, April 05, 2002 6:23 AM
      To: ASP Databases
      Subject: [asp_databases] HOw to?


      Hello Member!

      Just like to ask how can i make a table that has an alternate color
display of table rows?
      Any help would be appreciated.

      TIA
      ---------
      Earljon K. A. Hidalgo

      "Never give up on what you really want to do. The person with big
dreams is more powerful than one with all the facts."-- Life's Little
Instruction Calendar
  _____________________________________________________________________
  This message has been checked for all known viruses by Star Internet
  delivered through the MessageLabs Virus Scanning Service on behalf of
Kingfield Heath Ltd. For further information visit
http://www.star.net.uk/stats.asp



_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service on behalf of Kingfield Heath Ltd. For further information visit
http://www.star.net.uk/stats.asp

Message #3 by "Earljon K. A. Hidalgo" <earl@p...> on Fri, 5 Apr 2002 18:31:43 +0800
This is a multi-part message in MIME format.

------=_NextPart_000_002A_01C1DCD0.2270CA50
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Thank you very much....

  ----- Original Message -----
  From: Craig Flannigan
  To: ASP Databases
  Sent: Friday, April 05, 2002 6:10 PM
  Subject: [asp_databases] RE: HOw to?


  It's not vauge.

  ASP. Place this within your Loop which builds the table
  <%
   '-----------------------------------------------
   '--- Provides a alternate grey lines to a table
   '-----------------------------------------------
   
   If b=3D1 then
       BackCol =3D "#F4F4F4"
   Else
       BackCol =3D "#FFFFFF"
   End if

  b=3Db+1
  If b=3D2 then b=3D0
  %>


  HTML: Example
  <td width=3D"369" bgcolor=3D"<%=3DBackCol%>" height=3D"20">


  Hope this helps
  Craig.
    -----Original Message-----
    From: Earljon K. A. Hidalgo [mailto:earl@p...]
    Sent: 05 April 2002 11:13
    To: ASP Databases
    Subject: [asp_databases] RE: HOw to?


    Im sorry but I think my question is quite vague.
    My question is how can i display my table rows such that the color 
of the rows is alternating (eg: gray and white) How can i manipulate 
this on my ASP result page?

    Like this one:

          testing testing
          testing testing
          test test
          test test


    Thanks in advance
      ----- Original Message -----
      From: imran.saleem@b...
      To: ASP Databases
      Sent: Friday, April 05, 2002 5:08 PM
      Subject: [asp_databases] RE: HOw to?


      <TABLE BORDER=3D0>
      <TR BGCOLOR=3Dwhite>
        -----Original Message-----
        From: Earljon K. A. Hidalgo [mailto:earl@p...]
        Sent: Friday, April 05, 2002 6:23 AM
        To: ASP Databases
        Subject: [asp_databases] HOw to?


        Hello Member!

        Just like to ask how can i make a table that has an alternate 
color display of table rows?
        Any help would be appreciated.

        TIA
        ---------
        Earljon K. A. Hidalgo

        "Never give up on what you really want to do. The person with 
big dreams is more powerful than one with all the facts."-- Life's 
Little Instruction Calendar
    
_____________________________________________________________________
    This message has been checked for all known viruses by Star Internet
    delivered through the MessageLabs Virus Scanning Service on behalf 
of Kingfield Heath Ltd. For further information visit 
http://www.star.net.uk/stats.asp

  _____________________________________________________________________
  This message has been checked for all known viruses by Star Internet
  delivered through the MessageLabs Virus Scanning Service on behalf of 
Kingfield Heath Ltd. For further information visit 
http://www.star.net.uk/stats.asp


Message #4 by "Sidney Fuerte" <fuertsj1104@y...> on Fri, 5 Apr 2002 11:50:53
Hi Earl,
 
They already provided the answer... but in case you still want it detailed 
here's how to do it.
 
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
 
<body bgcolor="#FFFFFF" text="#000000">
<table width="225" border="0">
  <tr bgcolor="#CC6600"> 
    <td>&nbsp;</td>
  </tr>
  <tr bgcolor="#0000FF"> 
    <td>&nbsp;</td>
  </tr>
  <tr bgcolor="#FF0000"> 
    <td>&nbsp;</td>
  </tr>
  <tr bgcolor="#99CCFF"> 
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>
 
This table has 1 column and 4 rows, the rows has alternating colors, if 
you want the alternating to be dynamic in ASP, you'll have to use a LOOP 
like this.

<table width="225" border="0">
<%
Dim i
Dim color
color = "blue"
For i=0 to 5    'Condition Goes here'
 If color="blue" Then%>
      <tr bgcolor="<%=color%>">
        <td>Sample Text</td>
   </tr>
 <%
  color="red"
 Else%>
      <tr bgcolor="<%=color%>">
        <td>Sample Text</td>
   </tr>
 <%
  color="blue"
 End if
Next%>
</table>
 
 
I hope this will be a help for you. Good day!!
 
Best Regards
Sidney




> This is a multi-part message in MIME format.

------=_NextPart_000_0161_01C1DCA5.00E61DC0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello Member!

Just like to ask how can i make a table that has an alternate color 
display of table rows?
Any help would be appreciated.

TIA
---------
Earljon K. A. Hidalgo

"Never give up on what you really want to do. The person with big dreams 
is more powerful than one with all the facts."-- Life's Little 
Instruction Calendar


Message #5 by "Drew, Ron" <RDrew@B...> on Fri, 5 Apr 2002 07:58:29 -0500
This is a multi-part message in MIME format.

------_=_NextPart_001_01C1DCA1.956C0047
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

...Alternating Colors...
<%
Dim num
num =3D 0
Do While Not objRS.EOF
   Response.Write "<tr bgcolor=3D"""
      if num mod 2 =3D 0 then
         Response.Write "#B3C3D4"
      Else
         Response.Write "#FFFFFF"
      End IF
   Response.Write """>"
%>
' HERE YOU PUT YOUR TABLE
</tr>
<%
num =3D num + 1
objRS.MoveNext
Loop
%>
................or...............

'loop
 counter=3Dcounter+1
 response.write "<TR bgcolor=3D"""
 IF counter mod2=3D0 THEN
      response.write "#AAAAAA"
    ELSE
      response.write "#BBBBBB"
 END IF
 response.write """><TD>whatever is in your cell</TD></TR>"
'end loop

-----Original Message-----
From: Earljon K. A. Hidalgo [mailto:earl@p...]
Sent: Friday, April 05, 2002 12:23 AM
To: ASP Databases
Subject: [asp_databases] HOw to?



Hello Member!

Just like to ask how can i make a table that has an alternate color
display of table rows?
Any help would be appreciated.

TIA
---------
Earljon K. A. Hidalgo

"Never give up on what you really want to do. The person with big dreams
is more powerful than one with all the facts."-- Life's Little
Instruction Calendar


Message #6 by "Earljon K. A. Hidalgo" <earl@p...> on Fri, 5 Apr 2002 13:22:58 +0800
This is a multi-part message in MIME format.

------=_NextPart_000_0161_01C1DCA5.00E61DC0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello Member!

Just like to ask how can i make a table that has an alternate color 
display of table rows?
Any help would be appreciated.

TIA
---------
Earljon K. A. Hidalgo

"Never give up on what you really want to do. The person with big dreams 
is more powerful than one with all the facts."-- Life's Little 
Instruction Calendar


Message #7 by "Earljon K. A. Hidalgo" <earl@p...> on Fri, 5 Apr 2002 18:13:08 +0800
This is a multi-part message in MIME format.

------=_NextPart_000_001C_01C1DCCD.8A11E700
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Im sorry but I think my question is quite vague.
My question is how can i display my table rows such that the color of 
the rows is alternating (eg: gray and white) How can i manipulate this 
on my ASP result page?

Like this one:

      testing testing
      testing testing
      test test
      test test


Thanks in advance
  ----- Original Message -----
  From: imran.saleem@b...
  To: ASP Databases
  Sent: Friday, April 05, 2002 5:08 PM
  Subject: [asp_databases] RE: HOw to?


  <TABLE BORDER=3D0>
  <TR BGCOLOR=3Dwhite>
    -----Original Message-----
    From: Earljon K. A. Hidalgo [mailto:earl@p...]
    Sent: Friday, April 05, 2002 6:23 AM
    To: ASP Databases
    Subject: [asp_databases] HOw to?


    Hello Member!

    Just like to ask how can i make a table that has an alternate color 
display of table rows?
    Any help would be appreciated.

    TIA
    ---------
    Earljon K. A. Hidalgo

    "Never give up on what you really want to do. The person with big 
dreams is more powerful than one with all the facts."-- Life's Little 
Instruction Calendar


Message #8 by imran.saleem@b... on Fri, 5 Apr 2002 10:08:53 +0100
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C1DC81.81FABE30
Content-Type: text/plain;
	charset="iso-8859-1"

<TABLE BORDER=0>
<TR BGCOLOR=white>
.
.
.
.
 

-----Original Message-----
From: Earljon K. A. Hidalgo [mailto:earl@p...]
Sent: Friday, April 05, 2002 6:23 AM
To: ASP Databases
Subject: [asp_databases] HOw to?



Hello Member!
 
Just like to ask how can i make a table that has an alternate color display
of table rows?
Any help would be appreciated.
 
TIA
---------
Earljon K. A. Hidalgo

"Never give up on what you really want to do. The person with big dreams is
more powerful than one with all the facts."-- Life's Little Instruction
Calendar
--- 



  Return to Index