DotNet Beginner
DotNet Beginner

Reputation: 35

Display thumbnails using literal and bring large image on click event dynamically

My website is based on C#.net. I've a folder in which the user can place unknown number of images. Each image has a thumbnail version and large size.

For example, if image name is "car.jpg", the thumbnail image will be thcar.jpg" (i.e., just append "th" before image name).

In my pageload event, I want to display all these thumbnail images using asp:literal. When the user clicks a thumbnail image, I want to display the larger size of that image in a asp:image above thumbnails.

Can anyone help me with this? Code in jquery or javascript will be more useful, whereas I am happy with C# code also.... Thanks in advance,

Edit: My web page should look like

 ____________________
|                    |
|  Larger image      |
|                    |
|____________________|

Thumbnail images,

 _   _   _   _
|_| |_| |_| |_|

Whenever a thumbnail is clicked, the larger version of thumbnail image should be displayed....

Upvotes: 0

Views: 1570

Answers (1)

user669677
user669677

Reputation:

I made a basic example too:

http://jsbin.com/utijid/1

its source is here:

http://jsbin.com/utijid/1/edit

Upvotes: 0

Related Questions