Update an image URL without refreshing the page

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

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

jdi

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.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top