E
Eugene Anthony
The code bellow will display a list of folders in a directory. Now lets
say I have 20 folders, I want to display the first 10 folders, then
display another 10 folders 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
%>
<font class="error">No Pictures could be
found.</font>
<%
End If
%>
</td>
</tr>
</table>
Your help is kindly appreciated.
Eugene Anthony
say I have 20 folders, I want to display the first 10 folders, then
display another 10 folders 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
%>
<font class="error">No Pictures could be
found.</font>
<%
End If
%>
</td>
</tr>
</table>
Your help is kindly appreciated.
Eugene Anthony