Preloading Images

Discussion in 'ASP .Net' started by Miro, Oct 23, 2009.

  1. Miro

    Miro Guest

    I have been googling around and searching for how to preload images in

    Seems the answer is you cant - you have to use javascript.
    Thats fine,

    But ... I create the list of images to load dynamically on the "Load" event
    of the default.aspx from a folder.
    ( I grab all the jpg images )

    Basically I have an image rotating through on an ajax timer...
    I am trying to figure out so I can "load" the next image that will show up
    in 5 seconds, while the current one is being displayed.

    Miro, Oct 23, 2009
    1. Advertisements

  2. Miro

    Miro Guest

    I think I have found a solution - I will try it tonight...

    basically you setup an image and using css you hide it.
    So as I load the first images, I will set this imageurl to the next image in

    Miro, Oct 23, 2009
    1. Advertisements

  3. Miro

    Scott M. Guest

    In JavaScript, you can use the SetTimeOut(), ClearTimeOut(), SetInterval(),
    and ClearInterval() methods for timing an action.

    Scott M., Oct 23, 2009
  4. Miro

    Miro Guest

    Worked Like a Charm...

    Miro, Oct 23, 2009
  5. Miro

    Miro Guest

    Hi Scott,

    I found an ASP + CSS alternative...see my above post.

    Basically I have css not displaying 2 more images, and in my timer - i throw
    the next images to be displayed in there.


    Miro, Oct 23, 2009
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.