how to display pictures

RWorcester

Newcomer
Joined
Apr 6, 2006
Messages
3
My name is Ryan Worcester and I'm a student in High School learning Visual Studio... The thing I'm most interested in is learning ASP.NET, and I'm currently working on a website to learn how it works...
I would like to add pictures to my web site as small pictures, and when you click on a picture I would like to have the picture come up in another window (as a bigger size)...
I would like to know if I can do this using one page (and display different pictures on it depending on what picture was clicked(I will have a page with the small pictures and then I'll have a page to display the picture)), so that I don't have to make a separate page for each picture...
if I can do this can you please tell me how, and explain how it works?
thanks,
Ryan
 
RWorcester said:
My name is Ryan Worcester and I'm a student in High School learning Visual Studio... The thing I'm most interested in is learning ASP.NET, and I'm currently working on a website to learn how it works...
I would like to add pictures to my web site as small pictures, and when you click on a picture I would like to have the picture come up in another window (as a bigger size)...
I would like to know if I can do this using one page (and display different pictures on it depending on what picture was clicked(I will have a page with the small pictures and then I'll have a page to display the picture)), so that I don't have to make a separate page for each picture...
if I can do this can you please tell me how, and explain how it works?
thanks,
Ryan
This can be done with pure Javascript.

You just create an Image object linked to the location of your picture. After, you create a blank picture at the location where you want it to be displayed.

You reload the source of the image to the place holder image object.

Since cache is most of the time active, it will be reacting really quick.

The only draw back is that it takes more time to load. To avoid this issue, you shall put the picture download at the latest moment possible.

You can find suitable code by Googling a little bit.
 
Back
Top