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.CreateOb ject("Scripting .FileSystemObje ct")
If objFSO.FolderEx ists(myFolderPa th) Then
'The main picture folder exists
Set objPicturesFold er = objFSO.GetFolde r(myFolderPath)
Set collPicturesFol ders = objPicturesFold er.SubFolders
For Each indPicturesFold er in collPicturesFol ders
indPicturesFold erSpaces =
Replace(indPict uresFolder.Name ,"_"," ")
%>
<img src="icons/orangeball.gif" align="top">
<a href="thumb.asp ?Folder=<%= indPicturesFold er.Name
%>" class="links">
<%= indPicturesFold erSpaces %></A>
<%
Next
%>
<%
Set collPicturesFol ders = Nothing
Else
'The main picture folder does not exists
%>
<font class="error">N o Pictures could be
found.</font>
<%
End If
%>
</td>
</tr>
</table>
Your help is kindly appreciated.
Eugene Anthony
*** Sent via Developersdex http://www.developersdex.com ***
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.CreateOb ject("Scripting .FileSystemObje ct")
If objFSO.FolderEx ists(myFolderPa th) Then
'The main picture folder exists
Set objPicturesFold er = objFSO.GetFolde r(myFolderPath)
Set collPicturesFol ders = objPicturesFold er.SubFolders
For Each indPicturesFold er in collPicturesFol ders
indPicturesFold erSpaces =
Replace(indPict uresFolder.Name ,"_"," ")
%>
<img src="icons/orangeball.gif" align="top">
<a href="thumb.asp ?Folder=<%= indPicturesFold er.Name
%>" class="links">
<%= indPicturesFold erSpaces %></A>
<%
Next
%>
<%
Set collPicturesFol ders = Nothing
Else
'The main picture folder does not exists
%>
<font class="error">N o Pictures could be
found.</font>
<%
End If
%>
</td>
</tr>
</table>
Your help is kindly appreciated.
Eugene Anthony
*** Sent via Developersdex http://www.developersdex.com ***
Comment