Visualizzazione dei risultati da 1 a 3 su 3

Hybrid View

  1. #1
    sbagli la logica!

    for each ....
    DF=""
    select case ....
    If DF<>"" Then ' visto che assegni DF solo a quelli che ti interessano...
    .....tabella
    End If
    Next

    Ultima modifica di optime; 18-10-2013 a 19:38

  2. #2
    Utente di HTML.it
    Registrato dal
    May 2008
    Messaggi
    488
    Ok, scusa ma come faccio a non fargli ripetere la tabella o la frase tante volte per quanti file esistono nella cartella ?

    codice:
    <TABLE CELLPADDING=4  BORDER=1 WIDTH=100%>
    <% 
        For Each whatever in fc
        DF = ""
        Select Case Right(whatever.name,4)
        Case ".doc", ".txt"
            DF = "File di testo"
        Case ".xls"
            DF = "File di excel"
        Case ".pdf"
            DF = "File PDF"    
        Case else
        end Select
    %>
    <% if DF<>"" then %>
    <tr style="border-bottom-style: solid">
    <td colspan="2"><b>Elenco dei file presenti nella cartella "<u> <%=Sotto_Cartella%> </u>" :</b></td>
        </tr>
        <tr style="border-bottom-style: solid">
        <td><b>Nome File</b></td>
        <td><b>Tipo</b></td>
        </tr>
        <TR>
        <TD ALIGN=LEFT><FONT FACE="Arial" SIZE=2><%="<a href='"& Sotto_Cartella & "/" & whatever.Name & "'>"& whatever.Name & "</a>"%></FONT></TD>
        <TD ALIGN=LEFT><FONT FACE="Arial" SIZE=2><%=DF%></FONT></TD>
        </TR>
    <% else %>
    <tr style="border-bottom-style: solid">
    <td colspan="2"><b>Nella cartella "<u> <%=Sotto_Cartella%> </u>" non sono presenti file da scaricare .</b></td>
        </tr>
    <% end if %>
    <% next %>    
    </TABLE>

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 © 2025 vBulletin Solutions, Inc. All rights reserved.