udskriv 10 filer fra mappe For i=1 to 10
//Jeg skal kun liste ut 10 filer fra mappen!//Kan jeg ikke bruke For i=1 to 10 med en next?
<table width="135" border="0" cellspacing="1" cellpadding="0" bgcolor="#<%=strTMouseover%>">
<tr>
<td>
<table width="135" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff">
<tr>
<td width="4" class="tekst"> </td>
<td class="tekst"><font color="#<%=strTMouseover%>"><b>DOWNLOADS:</b></font></td>
</tr>
<%
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set folder = fso.GetFolder(Server.MapPath("downloads/"))
If folder.Size > 0 Then
For Each file In folder.Files
strFileSize = file.Size
strSuffix = "bytes"
If strFileSize > 1024 Then
strFileSize = strFileSize / 1024
strSuffix = "kB"
End If
If strFileSize > 1024 Then
strFileSize = strFileSize / 1024
strSuffix = "MB"
End If
strNewFileSize = FormatNumber(strFileSize,1,,,True) & " " & strSuffix
%>
<tr>
<td width="4" class="tekst"> </td>
<td class="tekst"><a href="downloads/<%=file.Name%>" title="<%=file.Name & " Størrelse: " & strNewFileSize%>"><img SRC="images/pil.jpg" border="0" WIDTH="10" HEIGHT="10"> <% =i & ". " & Left(file.Name,13) %>..</a></td>
</tr>
<%
Next
Else
%>
<tr>
<td width="4" class="tekst"> </td>
<td class="tekst">Ingen downloads.</td>
</tr>
<%End if%>
</table>
</td>
</tr>
</table>
