Click here to Skip to main content
14,266,194 members
Rate this:
Please Sign up or sign in to vote.
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
Rate this:
Please Sign up or sign in to vote.

Solution 1

   
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.
Rate this:
Please Sign up or sign in to vote.

Solution 2

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[^]
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100