Hi. I am making an asp website to sell items. On the details for individual products page I have an image and 3 smaller ones beneath. Clicking on one of them will bring up a larger image on the screen.
However, at the moment, I have to have 4 images for every product, but some products only have 1 or 2 images. I was wandering if there was a way to hide the extra unneeded thumbnails if the src is invalid. Or if there was a better way to achieve what I am trying to do.
The images are displayed as shown below. By using the product name to find the initial image and then letters 'a' 'b' and 'c' for the other thumbs.
(the images are all nested in <a> </a> and when clicked runs some javascript to show the picture in the center of the screen.
<img src="images/thumbs/<%#Eval("ProductName") %>.jpg" alt="<%#Eval("ProductName") %>">
<img src="images/thumbs/<%#Eval("ProductName") %>a.jpg" alt="<%#Eval("ProductName") %>">
<img src="images/thumbs/<%#Eval("ProductName") %>b.jpg" alt="<%#Eval("ProductName") %>">
Thanks