Visualizzazione dei risultati da 1 a 3 su 3

Discussione: Asp E Html

  1. #1
    Utente di HTML.it
    Registrato dal
    Oct 2004
    Messaggi
    131

    Asp E Html

    ciao sto sclerando!
    devo paginare dei risultati di una query inserendo:
    una colonna per un modulo input, una colonna per una immagine e una colonna divisa in 3 righe per titolo, descrizione e link.

    come posso impaginare tutto? e come posso ovviamente al modulo input dare il valore corretto?

    grazie mille

    ciao

  2. #2
    Eppyy dovresti essere un pochino più specifico nella descrizione del tuo problema, dire come è questa query, dire come è impostato il DB, dare i valori delle variabili, spiegare meglio come vuoi mostrare i risultati...

    Così è davvero un pò difficile aiutarti.

  3. #3
    Utente di HTML.it
    Registrato dal
    Oct 2004
    Messaggi
    131
    hai ragione rileggendo il post in effetti ho detto tutte e niente

    allora il codice che ho è "CODICE ASP":
    e mi impagina tutto in una cella
    il db è fatto cosi':
    titolo, descrizione, link, categoria, categoria2
    e il risultato vorrei fosse inserito in una tabella fatta cosi':
    TABELLA HTML <table class=menu
    style="BORDER-RIGHT: thin; BORDER-TOP: thin; BORDER-LEFT: thin; BORDER-BOTTOM: thin"
    bordercolor="#FF7300" cellspacing=0 cellpadding=1
    width="98%" align=center border=1>
    <tbody>
    <tr>
    <td width="5%" style="LINE-HEIGHT: 12px"><input name="tips2" type="checkbox" id="tips" value="iscritto">
    </td>
    <td width="7%" style="LINE-HEIGHT: 12px"></td>
    <td width="88%" style="LINE-HEIGHT: 12px"></td>
    </tr>
    </tbody>

    </table>

    CODICE ASP
    <%
    categoria2 = request.querystring("categoria2")
    categoria = request.querystring("categoria")
    %>
    <%
    Dim Conn
    Set Conn = Server.CreateObject("ADODB.Connection")
    conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & server.mappath("../mdb-database/link.mdb")
    Dim rs

    Set rs = Server.CreateObject("ADODB.Recordset")
    'rs.Open "select * from link order by id DESC", conn
    rs.Open "select * from link where categoria='" & categoria & "' OR categoria2='"& categoria2 & "' order by id DESC", conn
    Do while NOT RS.EOF
    %>




    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="100%"><table width="100%" height="8" border=1 align=center cellpadding=1 cellspacing=0 bordercolor=darkblue class=menu style="BORDER-RIGHT: thin; BORDER-TOP: thin; BORDER-LEFT: thin; BORDER-BOTTOM: thin">
    <tbody>
    <tr>
    <%
    Dim descrizione
    Dim link
    Dim titolo

    Contatore = 1
    do while not rs.EOF
    'tutte le variabili in una cella
    'Response.write "<td bgcolor=#FFFF99>"&rs("titolo")&","&rs("descrizione ")&","&rs("link")&"</td>"
    Response.write "<tr bgcolor=#FFFF99>""" &rs("titolo")&"""</tr>"
    Response.write "<tr bgcolor=#FFFF99>"&rs("descrizione")&"</tr>"
    'Response.write "<tr bgcolor=#FFFF99>""<a href="&rs("link")&"</a>""</tr>"
    Response.write "<tr bgcolor=#FFFF99>"&rs("link")&"</tr>"

    if (Contatore mod 1) = 0 then
    Response.write ("</tr><tr>")
    end if

    Contatore = Contatore + 1

    rs.MoveNext
    loop
    %>
    </tr>
    </tbody>
    </table>
    </td>
    </tr>
    </table>




    </p>

    <%
    loop
    RS.Close

    Set RS = Nothing

    conn.Close

    Set conn=Nothing

    %>

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.