"McGrull" wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
: Ok, and if are more files, and i want to array the listing in multiple
: pages, linkable to view the page in my interest, how i can do that?
If you're wanting to use the array on multiple pages then you could put your
array in a session variable but copy it to a local variable when you use it.
' get files, put into array
session("arrFiles") = arrFiles
' grab array from session when you want to use it.
dim arrFiles
arrFiles = session("arrFiles")
If you had your files in an array and you had 30 and wanted 10 on each page,
this is one way:
pages: list1, list2, list3
dim i, j, arrList1(), arrList2(), arrList3()
redim arrList1(9) : redim arrList2(9) : redim arrList3(9)
j = 0
for i = 0 to ubound(arrFiles) step 3
arrList1(j) = arrFiles(i)
arrList2(j) = arrFiles(i + 1)
arrList3(j) = arrFiles(i + 2)
j = j + 1
next
erase arrList
if session("assList1") <> "" then
session("arrList1") = arrList1
end if
session("arrList2") = arrList2
session("arrList3") = arrList3
....then on each page:
list1.asp
dim arrList, i
arrList = session("arrList1")
for i = 0 to ubound(arrList)
Response.Write "<a href=""" & arrList & """>" & arrList & "</a><br />"
next
list2.asp
....
list3.asp
....
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center -
http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation -
http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library -
http://msdn.microsoft.com/library/default.asp