Start New Discussion within our Web Development Community
You can display as many banners as you want. Just change the intTotalBanners to how many banners you have and change the saryBanners(3,3) number 3 (in red) to how many banners you have add more saryBanners(1,3) (changing the number in red for each new banner, go up 1 each time).

Heres the code, just include it where you want the banner(s) to dispaly:

<%
Dim saryBanners(3,3)
Dim intRandomNumber
Dim intTotalBanners

intTotalBanners = 3

saryBanners(1,1) = "Visit MadDogs-ASP.com!"
saryBanners(1,2) = "http://www.maddogs-asp.com/images/portal-banner.gif"
saryBanners(1,3) = "http://www.maddogs-asp.com/"

saryBanners(2,1) = "Visit MadDogs-ASP.com!"
saryBanners(2,2) = "http://www.maddogs-asp.com/forum/uploads/maddog.gif"
saryBanners(2,3) = "http://www.maddogs-asp.com/"

saryBanners(3,1) = "Visit MadDogs-ASP.com!"
saryBanners(3,2) = "http://www.maddogs-asp.com/images/maddogs-portal.gif"
saryBanners(3,3) = "http://www.maddogs-asp.com/"

randomize
intRandomNumber = Int((intTotalBanners) * Rnd + 1)

Response.Write("<a href=""" & saryBanners(intRandomNumber,3) & """ title=""" & saryBanners(intRandomNumber,1) & """ target=""_blank""><img src=""" & saryBanners(intRandomNumber,2) & """ border=""0""></a>")

%>