Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - random image rotator component using ASP?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

random image rotator component using ASP?

 Post Reply Post Reply
Author
sarumu1 View Drop Down
Newbie
Newbie


Joined: 07 February 2005
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote sarumu1 Quote  Post ReplyReply Direct Link To This Post Topic: random image rotator component using ASP?
    Posted: 09 February 2005 at 6:09pm
Does anyone know of a good ASP solution for a random image rotator component - something very similar to the image rotator created by Dan Benjamin at a list apart : http://www.alistapart.com/articles/betterrotator/

(Dan Benjamin's solution is PHP based)

I'm looking for a solution that will allow me to have a group of images that are kept in a folder designated for a specific page that will call up one of those images randomly.

On top of that, I'm looking for a solution that will allow me to simply insert or remove an image from that folder without touching the source code that calls up the image.

Any ideas?

Subbu.
Back to Top
bootcom View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 February 2005
Location: United Kingdom
Status: Offline
Points: 259
Post Options Post Options   Thanks (0) Thanks(0)   Quote bootcom Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2005 at 10:35pm
Do it without using a component at all ... can I ask do you want it to call a random image everytime ??
 
If so, I can give you some code that will do this for you, just drop me a PM/ email and I will go through it with you.
Back to Top
MadDog View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 01 January 2002
Status: Offline
Points: 3008
Post Options Post Options   Thanks (0) Thanks(0)   Quote MadDog Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2005 at 11:18pm
IIS has a built in ad rotator component. Try doing a search on google, there are tons of tutorials.
Back to Top
ub3rl337ch3ch View Drop Down
Senior Member
Senior Member
Avatar

Joined: 16 February 2005
Location: Australia
Status: Offline
Points: 341
Post Options Post Options   Thanks (0) Thanks(0)   Quote ub3rl337ch3ch Quote  Post ReplyReply Direct Link To This Post Posted: 28 February 2005 at 12:27am

you could use a random number gen, and simply use filenames for your images which include those numbers (ie img_1.gif, img_2.gif etc) then wherever you want the random image, just go:

images/img_<%=randomnumber%>.gif
 
obviously it requires all images to be the same file type, and it would require you to change the code whenever you changed the number of images in the folder and the above code undoubtedly use incorrect syntax, but you get my drift? whether thats just being overly creative for what might be a relatively simple problem i have no idea, but its a thought.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.