ASP 101 - Active Server Pages 101 - Web04
The Place ASP Developers Go!

Please visit our partners


Windows Technology Windows Technology
15 Seconds
4GuysFromRolla.com
ASP 101
ASP Wire
VB Forums
VB Wire
WinDrivers.com
internet.commerce internet.commerce
Partners & Affiliates














ASP 101 is an
internet.com site
ASP 101 is an internet.com site
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash





Script Output:

Method #1:

Random Image

Method #2:

Random Image #1

Method #3:

Random Image

ASP HTML Download            FAQ

ASP.NET Version

We've had a random number generation script on the site for a while, but I continue to get questions about how to show a random image so here you go.

As I started writing this, I realized there are a number of ways to tackle the problem and the one you choose probably has a lot to do with your particular situation and requirements. So I decided that instead of just displaying a random image, I'd do it three different ways and display three of them in an effort to illustrate some different approaches. They all rely upon the random number generator to pick an image, but how that number is translated to a file name indicating which image to show varies quite a bit from one method to the next.

Oh and if you're wondering where I got the images, they're from the website of the most recent addition to my development toolbox. They probably won't make you a better programmer, but they might just help you meet that deadline your boss just sprung on you!


Samples

Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers