Click here to Skip to main content
11,496,146 members (355 online)
The site is currently in read-only mode for maintenance. Posting of new items will be available again shortly.
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 2:21am
Edited 4-Mar-11 2:28am
Slacker007 at 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)
<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 Sergey Alexandrovich Kryukov 10,401
1 OriginalGriff 8,910
2 Sascha Lefèvre 3,899
3 Maciej Los 3,422
4 Richard Deeming 2,600

Advertise | Privacy | Mobile
Web03 | 2.8.150520.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