Click here to Skip to main content
11,790,366 members (61,920 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C# ASP.NET image
I have one 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 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 1:21am
Edited 4-Mar-11 1:28am
Slacker007 at 4-Mar-11 7:29am
Edited for readability and shortened the original question title.

1 solution

Rate this: bad
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 
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)

  Print Answers RSS
0 OriginalGriff 315
1 ppolymorphe 219
2 Richard MacCutchan 158
3 Jochen Arndt 95
4 Maciej Los 90
0 OriginalGriff 1,114
1 Maciej Los 825
2 KrunalRohit 686
3 CPallini 611
4 ppolymorphe 610

Advertise | Privacy | Mobile
Web01 | 2.8.1509028.1 | Last Updated 18 Apr 2013
Copyright © CodeProject, 1999-2015
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