Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

  • 2 weeks later...
Posted
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.

"If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown

"Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me

"A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend.

C# TO VB TRANSLATOR

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...