• 0
Sign in to follow this  
shelter

Linhas Color

Question

Boaaaaa fala galera,

aqui alguém sabe me informar como intercalo as cores das linhas em uma consulta ...

Estilo são as linhas do tópico , cada uma de uma cor....

Valeu fuiiiiiiiiiii

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Aqui meu codigo...

Pode me ajudar?

aonde entro como codigo para intercalar as cores

<%

Option Explicit

%>

<!--#Include file="conexao2.inc"-->

<%

Dim conexaodb , rsRamal , strSQL

Dim iCount

Dim sRowColor

strSQL = " Select * From ramal order by ramal asc "

Call abreConexao

Set RsRamal = Conexaodb.Execute(strSQL)

%>

<html>

<head>

<style type="text/css">

<!--

.style11 {font-family: Arial; font-size: 11px; font-weight: bold; }

body,td,th {

font-family: Arial;

font-size: 12px;

color: #000000;

}

-->

</style><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

<body color= "#ffffff">

<table width="70%" border="0" cellspacing="1" cellpadding="1">

<tr>

<td width="21%"><u><strong>Rela&ccedil;&atilde;o de Ramais: </strong></u></td>

<td width="6%">&nbsp;</td>

<td width="51%">&nbsp;</td>

<td width="22%"><u><strong>Imprimir Rela&ccedil;&atilde;o </strong></u></td>

</tr>

</table>

<table width="70%" border="0" cellspacing="1" cellpadding="1" height="1">

<tr>

<td width="50" height="14"><span class="style11">Ramal</span></td>

<td width="200" height="14"><span class="style11">Setor</span></td>

<td width="150" height="14"><span class="style11">Local</span></td>

<td width="150" height="14"><span class="style11">DDR</span></td>

<td width="150" height="14"><span class="style11">Grupo Ramal </span></td>

</tr>

<tr>

<td height="1">

<hr color="#000000" width="40" style="border-style: dotted; border-width: 1" size="0" align="left">

</td>

<td height="1">

<hr color="#000000" width="180" style="border-style: dotted; border-width: 1" size="0" align="left">

</td>

<td height="1">

<hr color="#000000" width="140" style="border-style: dotted; border-width: 1" size="0" align="left">

</td>

<td height="1">

<hr color="#000000" width="140" style="border-style: dotted; border-width: 1" size="0" align="left">

</td>

<td height="1">

<hr color="#000000" width="140" style="border-style: dotted; border-width: 1" size="0" align="left">

</td>

</tr>

</table>

<table width="70%" border="0" cellpadding="1" cellspacing="0" >

<%

Do while Not RsRamal.EOF

iCount = iCount + 1

If iCount Mod 2 = 0 Then

sRowColor = "#F8F8F8"

Else

sRowColor = "#C4CEE5"

End If

%>

<tr>

<td width="50" height="10" ><p><font size="1" face="Arial">

<% = RsRamal.fields("Ramal") %>

</font></p> </td>

<td width="200"><font size="1" face="Arial">

<% = RsRamal.fields("Grupo") %>

</font></td>

<td width="150"><font size="1" face="Arial">

<% = RsRamal.fields("Local") %>

</font></td>

<td width="150"><font size="1" face="Arial">

<% = RsRamal.fields("DDR") %>

</font></td>

<td width="150"><font size="1" face="Arial">

<% = RsRamal.fields("Grupo Ramal") %>

</font></td>

</tr>

<%

RsRamal.MoveNext

Loop

Rsramal.Close

Call fechaConexao

Set rsramal = Nothing

%>

</table>

</body>

</html>

Share this post


Link to post
Share on other sites
  • 0

.

.

sRowColor = "#F8F8F8"

Else

sRowColor = "#C4CEE5"

End If

%>

<tr bgcolor="<%= sRowColor %>">

<td width="50" height="10" ><p><font size="1" face="Arial">

<% = RsRamal.fields("Ramal") %>

</font></p> </td>

.

.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this