
06/08/2003, 06:19
|
 | | | Fecha de Ingreso: julio-2002 Ubicación: EH - BCN
Mensajes: 222
Antigüedad: 22 años, 9 meses Puntos: 0 | |
te pongo un ejemplo... para mostrar registros de 10 en 10 yy cambiar el color alternativamente...
para cambiar de pagina hay que pasarle un valor a por el querystring a "pag".
StrSQL = "SELECT id, nombre, apellidos, fecha,info FROM contactos_web order by fecha desc"
RS.Open strSQL, Conexion, 1 ,2
if request.querystring("pag") <> "" then
intCurrentPage = request.querystring("pag")
else
intCurrentPage = 1
end if
arrelementos = RS.GetRows 'Carga el array y cierra el RecordSet
intTotalRecords = RS.RecordCount
RS.Close
Set RS = Nothing
Conexion.Close
set Conexion = Nothing
intPageSize = 10 ' 10 registros por página
intStart = ((intCurrentPage - 1) * intPageSize)
intEnd = intStart + intPageSize - 1
intCurrentRecord = intStart
<%
Do
id = arrelementos(0, intCurrentRecord)
nombre = trim(arrelementos(1, intCurrentRecord))
apellidos = trim(arrelementos(2, intCurrentRecord))
fecha = arrelementos(3, intCurrentRecord)
info = arrelementos(4, intCurrentRecord)
if i mod 2 = 0 then
color = "#006633"
else
color = "#FF0000"
end if
%>
<font color="#<%=color%>"AQUI MUESTRA CADA REGISTRO </font>
<% i = i +1
intCurrentRecord = intCurrentRecord + 1
If intCurrentRecord >= intTotalRecords Then Exit Do
Loop While intCurrentRecord <= intEnd
%>
espero que te sirva.
__________________ Cita: Gaur ere nahi nuke...
zure ondoan esnatu |