Update an image URL without refreshing the page

  • Thread starter Thread starter jdi
  • Start date Start date
J

jdi

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.
 
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.
 
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.

Thanks for the info. I was wondering, however, if there is anyway of
doing this using pure ASP.NET code and no javascript?

thanks.
 
Back
Top