0

Is it possible to make an abstract class that handles a pre-render of the page showing what you want to show (image/gif) while the user waits for the page to load?

How about managing every object-load in the page?

For example, I have a large image with a lot of stuff in it. But I know it's size long before I load it. I could put a darkscreen on the location I'll be placing the image with a loading animated gif within it.

What I want to avoid is the user to see the slow upside down load of every single image.

Could it be possible to see some code examples of how is it done? Do you use Silverlight for this?

apacay
  • 1,702
  • 5
  • 19
  • 41

1 Answers1

1

This isn't a server-side thing.

ASP.net receives a request and sends a response from and to the browser respectively.

No server-side action can manipulate client-side DOM.

If you want to do that you need to use JavaScript and DHTML approaches, because this way you'll be able to render an entire page and leave some areas in a "loading" state while some resource is being loaded.

Maybe this other question and answers in Stackoverflow may help you in handling image loading:

Community
  • 1
  • 1
Matías Fidemraizer
  • 63,804
  • 18
  • 124
  • 206
  • ías Now that you are telling me this, it's just too obvious that it's not a server-side thing. But I'm almost sure that Visual Studio now handles this stuff in a more "Microsoftly" way than javascript (That in the old versions of VS.net weren't existing, just like the awful RequiredFieldValidator in 1.1, remember those?). Maybe this could be solved with Silverlight? I DK.. – apacay May 31 '11 at 18:25
  • If it's that obvious.. why you're asking it!! ;) By the way, no, there's no built-in, out-of-the-box way of doing that. You need to taylor your custom solution as I suggested you :D – Matías Fidemraizer May 31 '11 at 19:02
  • Ok Thanks. But Do you know how to do this with silverlight (or if it's possible to handle that with it)? – apacay Jun 01 '11 at 14:22
  • Well, if you use Silverlight is a client-side thing anyway, but you've more power, but I find an overkill using Silverlight because this requirement. If you check the link I gave you in the answer, you'll have a good hint of how to workaround your situation. Set a timer and until images have "completed" property false, show some animation where images should be viewed. – Matías Fidemraizer Jun 01 '11 at 14:33