Image Question

Bluu

New member
Joined
Dec 18, 2009
Messages
1
Programming Experience
Beginner
I am new (like don't really have a clue) to coding. I us Expression Web 3 for my page design and have ran into something I can not make it do. I was hoping there was a way to use VB.net to accomplish this.

What I would like is to have a peice of code that can look at a folder I specify then display a random image from that folder on a page. I need this to also have the ability to look at the IPTC meta data in the image and use the the caption or description tag as a caption under the image on the page.

I do not want the VB code to have to look at a list of the files (like an XML file or an array in the code that I maintain). I need it to look at the folder and determine for itself and build its own list of file names to use when picking one at random.

Is this a farily simple task? And if so can a complete newbie like myself accomplish this with some guidance? Any one want to point me in the right direction?

Thanks
Luke
 
well I can kinda point you in the right direction I'm not that experienced with Web Development first off to be perfectly honest but as for connecting a VB.Net Application to Expression Web 3 might be tricky if you wanna use VB.Net to aid in Web Development you might be better off using Visual Web Developer now as for randomly selecting an image you can create a random number generator
Dim myRandom as Random

this is your variable then initialize myRandom
myRandom = new Random
then randomly generate then number

myNum = myRandom.Next(1, 9)
assuming you have declared the variable myNum with an Integer Datatype this will
assign a random number between 1 and 10 to the value of myNum then to make it even more complicated use a for a loop

For i = 0 to myNum
if File.Exists("C:\FileName.bmp") = true then
'for example load it into a picturebox
picturebox1.image = image.fromfile("C:\FileName.bmp")
End if
Next
so basically what a should say is its most likely very do able but placing the image onto a web page would make your task extremely complicated
 
Back
Top