I got a mail from a developer who wanted to display a list of links where the order where random. And it puzzled me for a while how to accomplish this. So I started coding and soon I had this code: <% 'Make link array DIM LinkArray(4,2) 'Putting in the links into the array 'If you want, you can read those links from 'a text file or a db. If you want more links, just 'increase the size of the array LinkArray(0,1)="http://haneng.com" LinkArray(0,2)="A cool ASP site: haneng.com!" LinkArray(1,1)="http://www.news.com" LinkArray(1,2)="Computer news from news.com!" LinkArray(2,1)="http://www.yahoo.com" LinkArray(2,2)="Do you Yahoo?" LinkArray(3,1)="http://www.hotbot.com" LinkArray(3,2)="My favorite search engine: hotbot" LinkArray(4,1)="http://www.gamecenter.com" LinkArray(4,2)="Visit Gamecenter" %>
<% Randomize NotChooseUsAgain = "#" FOR i=0 TO UBound(LinkArray) WHILE NOT OK RandomVar = Int(Rnd * (Ubound(LinkArray)+1)) IF InStr(NotChooseUsAgain,"#" & RandomVar & "#")=0 THEN OK = true NotChooseUsAgain = NotChooseUsAgain & RandomVar & "#" END IF WEND %> <%=LinkArray(RandomVar,2)%>