Here's what I've done displaying random images and corresponding links.<br><br><%<br>Dim strPhysPath1,FSO1,loopcount1, iCount1, x, y, z<br>Dim jCount1,Count1,poscomma1,imgName1,href1,strImage<br>Dim tem1,tem2,stream1,tem<br>Dim dummy(),num(),line1()<br><br>'-------------Create file system object and read the contents of a file into an array------------<br><br>strPhysPath1 = server.MapPath("."

& "\Img_Link_T.txt"<br>Set FSO1 = CreateObject("Scripting.FileSystemObject"

'server.<br>Set Stream1 = FSO1.OpenTextFile(strPhysPath1, 1)<br><br>Count1 = 0<br>redim line1(0)<br><br>Do While stream1.atendofstream <> true<br>line1(count1)= stream1.readline<br>redim preserve line1(ubound(line1) + 1)<br>Count1 = Count1 + 1<br>Loop<br>redim preserve line1(ubound(line1)- 1)<br>Stream1.Close<br>set Sream1 = nothing<br><br>'----------- Create dummy array to hold a sequence of numbers------------------------- <br><br>ReDim dummy(0)<br>tem1 = 0<br><br>For loopcount1 = 0 To count1 - 1<br> dummy(loopcount1) = tem1<br> ReDim Preserve dummy(loopcount1 + 1)<br> tem1 = tem1 + 1<br>Next<br><br>'------------Generate random numbers,sort them and eliminate duplicates--------------<br><br>ReDim num(0)<br><br>For loopcount1 = 0 To 6<br>Randomize<br> jCount1 = CInt(Rnd() * (Count1 - 1))<br> num(loopcount1) = jCount1<br> For x = 0 To UBound(num)<br> If loopcount1 <> x Then<br> If jCount1 = num(x) Then<br> For y = 0 To UBound(num)<br> If num

<> dummy

Then<br> num(loopcount1) = dummy

<br> Exit For<br> End If<br> Next<br> If num(loopcount1) = jCount1 And y = UBound(num) Then num(loopcount1) = dummy(y + 1)<br> End If<br> End If<br><br> Next<br> <br> For z = 0 To UBound(num) - 1<br> For y = z + 1 To UBound(num)<br> If num

< num(z) Then<br> tem = num(z)<br> num(z) = num

<br> num

= tem<br> End If<br> Next<br> Next<br>ReDim Preserve num(loopcount1 + 1)<br>Next<br><br>'-------------Display random images onto page---------------------------<br><br>for tem2 = 0 to 6<br> for iCount1 = 0 to count1 - 1<br> If iCount1 = num(tem2) Then<br> <br> strImage = line1(iCount1)<br> poscomma1 = InStr(1, strImage, ","

<br> imgName1 = Left(strImage, poscomma1 - 1)<br> href1 = Right(strImage, Len(strImage) - poscomma1)<br> Response.Write "<a href='" & href1 & "'><IMG border = 0 SRC='images1_8_5/thumbs/" & imgName1 & "'></a><br><br>" <br> End If <br> next<br>Next<br><br>%><br><br><br>Of course, this is may be not the best way to do it, but it works. <br>Good luck