Update an image URL without refreshing the page

Discussion in 'ASP .Net' started by jdi, Nov 6, 2003.

  1. jdi

    jdi Guest

    Hello,
    I have a seemingly basic question about ASP.NET. I would like to
    create a page containing an image, which keeps swapping the url of the
    image source, without refreshing the entire page. So when the page
    first loads I'd like the image url to be "img1.gif"; then 20 seconds
    later "img2.gif"; then "img3.gif", and so on. All this should take
    place dynamically without refreshing the page.

    Any help would be appreciated.

    thanks.
     
    jdi, Nov 6, 2003
    #1
    1. Advertisements

  2. jdi

    Guest Guest

    Yes, use javascript to cache your images on the client-
    side and swap them out when a timeout occurs. Use
    window.setTimeout to implement your timer and just change
    the src of your image element on each timeout.
     
    Guest, Nov 6, 2003
    #2
    1. Advertisements

  3. jdi

    jdi Guest

    Yes, use javascript to cache your images on the client-
    Thanks for the info. I was wondering, however, if there is anyway of
    doing this using pure ASP.NET code and no javascript?

    thanks.
     
    jdi, Nov 14, 2003
    #3
    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.