paging folders
The code bellow will display a list of folders in a directory. Now lets say I have 20 folders or any number of folders, I want to display the first 5 folders, then display another 5 folders and so on just like the paging concept how is it done?.
<table cellpadding="3" cellspacing="0" border="0" width="420">
<tr>
<td width="120"> </td>
<td width="300">
<%
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
If objFSO.FolderExists(myFolderPath) Then
'The main picture folder exists
Set objPicturesFolder = objFSO.GetFolder(myFolderPath)
Set collPicturesFolders = objPicturesFolder.SubFolders
For Each indPicturesFolder in collPicturesFolders
indPicturesFolderSpaces = Replace(indPicturesFolder.Name,"_"," ")
%>
<img src="icons/orangeball.gif" align="top">
<a href="thumb.asp?Folder=<%= indPicturesFolder.Name %>" class="links">
<%= indPicturesFolderSpaces %></A>
<%
Next
%>
<%
Set collPicturesFolders = Nothing
Else
'The main picture folder does not exists
%>
No Pictures could be found.
<%
End If
%>
</td>
</tr>
</table>
Your help is kindly appreciated.
|