Click here to Skip to main content
15,895,709 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
See more:
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
Updated 4-Mar-11 1:28am
v2
Comments
Slacker007 4-Mar-11 7:29am    
Edited for readability and shortened the original question title.

1 solution

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)
XML
<script type="text/javascript">
var prm = Sys.WebForms.PageRequestManager.getInstance(); 
if(prm) prm.add_pageLoaded( PageLoadedEventHandler );  

function PageLoadedEventHandler() 
{   
  // Do your stuff 
}
</script>
 
Share this answer
 
v2
Comments
Sandeep Mewara 4-Mar-11 8:23am    
Good answer! 5!
Slacker007 4-Mar-11 8:50am    
Good answer as well. +5
Monjurul Habib 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)



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