Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET image
I have one asp.net page with only one image on that page. When the page loads the rest of the contents in the page become visible only after the image finishes loading.
 
Can I load the page completely before image loads completely?
 

 

[orig. title]
I have one asp.net page , One image is there in that page . When loading After laoding the image , rest of the contents in page visible.
Posted 4-Mar-11 2:21am
Edited 4-Mar-11 2:28am
Slacker00774.8K
v2
Comments
Slacker007 at 4-Mar-11 7:29am
   
Edited for readability and shortened the original question title.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

If you mean after page is loaded on the client, then you can use this ASP.NET Ajax code: (It requires that you have a asp:ScriptManager on the page to enable AJAX)
<script type="text/javascript">
var prm = Sys.WebForms.PageRequestManager.getInstance(); 
if(prm) prm.add_pageLoaded( PageLoadedEventHandler );  
 
function PageLoadedEventHandler() 
{   
  // Do your stuff 
}
</script>
  Permalink  
v2
Comments
Sandeep Mewara at 4-Mar-11 8:23am
   
Good answer! 5!
Slacker007 at 4-Mar-11 8:50am
   
Good answer as well. +5
Monjurul Habib at 4-Mar-11 15:44pm
   
this would be my answer too. my 5+

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



Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 18 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

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