Display Unknown number of pictures as thumbnails on a web page

Hi, a newbie question here!

I am writing a web site using VS2005 Asp.Net 2 and Ajax. The bit I currently have an issue with is below, I don’t know what technology or control, or methodology to use and so don’t know where to start reading. Can anybody point me in the right direction please!

When the page loads I want it to check a folder on the server for images, I wont know until run time how many images will be in the folder ( it should be somewhere between 5 and 30 ) then in a small section I want to display these images as thumbnails that I can scroll back and forth across. I then need to go off and execute code depending on what image they clicked.

I had assumed I would use an UpdatePanel and set the <div> up like below to give me the ‘window’ on the page to scroll back and forth thus showing the images

<div style="height:100px; width:468px; overflow:auto; white-space: nowrap" id="DIV1"> 

I was wondering if I could at run time count the number of images, then create ( I don’t know how to do this bit ) image controls in the <div> and then populate each image control with the relevant image, of course being able to trap the OnClick event of them all but knowing which one was clicked. 

 I hope this sort of makes sense!!   Has anybody got any pointers on how to do this or if whole approach is wrong…..???? Thank you in advance J
Read More


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s