Click here to Skip to main content
15,891,864 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a webpage that displays an image using a generic imagehandler. the image takes a few seconds to load, so rest of the page is completed before the image is loaded. I am using an overlay (using a div showing loading...) that is hidden by the code-behind file once the html is generated and displayed.
But the problem is that the image is still loading and the overlay has gone.
Is there anyway to control the div from the handler or to figure out in code-behind page that the image has completed loading?
Posted

 
Share this answer
 
v2
Comments
jgpatel 23-Feb-12 16:32pm    
Joachim,
Preloading might not be a good idea in my case. The images are dynamically created. i will have to move a bunch of code to the preloader page to get the image there.

I think I need some way of finding out when the handler finishes loading.
I found a solution to my problem. It is a workaround but worked for my situation

I used a background loading image for the image while it was loading
http://stackoverflow.com/questions/4635388/how-to-display-loading-image-while-actual-image-is-downloading[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900