How to refresh image?

R

Rainer Sinsch

Hello everyone,

does anyone know, how I can refresh a webform image by pressing an
asp.net-button?

I have a statistics-jpg which gets updated every 5 minutes and want to
provide a manual refresh button. My initial try was to simply do a post-back
when pressing the button and adding

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" content="no-cache">

to the page. However this does not suffice: if the button is pressed a
chached image appears. If I press F5 I get the updated picture.

Any ideas on this?

Thanks in advance
Rainer Sinsch
 
E

Eliyahu Goldin

Rainer,

You can trick browser by adding a random query parameter to the image url.

Eliyahu
 

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

Top