salve a tutti!
ho un picolo problema con l'impaginazione dei dati prelevati da un database.
Il codice l'ho recuperato da uno script in rete, e modificato a seconda delle mie esigenze.
Ho un catalogo, il quale visualizza i prodotti uno sotto l'altro, io volevo far si che che preimpostando una larghezza fissa che sarà opportunamente studiata in base ai prodotti (Es. 500px) mi inserisse i prodotti,uno difianco all'altro...ma non non vengo fuori...vi posto la aprte del codice in questione..
Vi premetto che sono riuscito ad ottnere l'affiancamento dei prodotti...levando il <TD> dal dato che prelevavo dal database...solo che io volevo comunque riuscire ad impaginarli in una cella
<table border="1" width="500" cellspacing="0" cellpadding="3" align="center" bordercolor="#CCCCCC">
<tr>
<tr bgcolor="<%=Tabella_Colore_Cella%>">
<td align="center" bgcolor="#CCCCCC">Nome</td>
</tr>
<%
If (QSSCategoria = "") AND (QSCategoria = "") AND (QSQuery = "") Then
Response.Redirect Request.ServerVariables("HTTP_REFERER")
Else
'---Stampo a video i prodotti delle categorie richieste
Set RS = Server.CreateObject("ADODB.RecordSet")
RS.PageSize = MaxProdottiPerPagina
If QSQuery <> "" Then
QSQuery = Replace(QSQuery, "'", "''")
ArrQuery = Split(QSQuery, " ")
SQL = " SELECT * FROM Prodotti WHERE "
For i = 0 to UBound(ArrQuery, 1)
SQL = SQL & "(Prodotto LIKE '%" & ArrQuery(i) & "%' OR PDescrizione LIKE '%" & ArrQuery(i) & "%' OR GDescrizione LIKE '%" & ArrQuery(i) & "%') AND "
Next
SQL = SQL & "Cancellato = False"
RS.Open SQL, Conn, 1
Else
If (QSCategoria = "") Then
SQL = " SELECT * FROM Prodotti WHERE SCategoria = "& [QSSCategoria] &" AND Categoria = 0 AND Cancellato = False "
RS.Open SQL, Conn, 1
End If
If (QSCategoria <> "") Then
SQL = " SELECT * FROM Prodotti WHERE Categoria = "& [QSCategoria] &" AND Cancellato = False"
RS.Open SQL, Conn, 1
End If
End If
If Not RS.EoF Then
RS.MoveFirst
RS.AbsolutePage = QSPg
If QSPg <> 1 Then
Footer = "" & PrimaPagina & " "
Else
Footer = PrimaPagina & " "
End If
For I = 1 To RS.PageCount
If I = QSPg Then
Footer = Footer & I & " "
Else
Footer = Footer & ""& I &" "
End If
Next
If QSPg <> RS.PageCount Then
Footer = Footer & "" & UltimaPagina & ""
Else
Footer = Footer & UltimaPagina
End If
For I = 1 To RS.PageSize
If RS.EOF Then Exit For
%>
<tr bgcolor="<%=Tabella_Colore_Cella%>">
<td width="75" valign="top">
"><%=RS("Prodotto")%></td>
</tr>
<%
RS.MoveNext
Next
Else
%>
<tr bgcolor="<%=Tabella_Colore_Cella%>">
<td colspan="10" align="center">
<%=NoRecordTrovati%> </td>
</tr>
<%
End If
End If
RS.Close
%>
</table>

Rispondi quotando