Image

R

Roberto Carcione

Hi at all,
in have a webform (.aspx) where i display such an image i modify each time
he user press a button. The image (the control is
System.Web.UI.WebControls.Image) is different each time the user press the
button. So when the user presses the button i change the property ImageUrl
to the new image i created. But the file, where i create the new image, is
always the same, so the user doesn't see the new image...because the image i
created doesnt' download from explorer because the file already exists into
the temporary explore directory....
So, if you understand, how can i "invalidate" or "force" this control so
internet explorer can download the same image file (but the image into the
file is different)?

thanks

roberto carcione
 
K

Karl Seguin

One quick trick is to add a querystring to the image Url.

myImage.ImageUrl = "someImage.jpg?id=" + someId.ToString();

if someId is unique each request, the browser shouldn't cache it.

Karl
 
R

Roberto Carcione

It's ok now.

Thanks Karl.


roberto carcione


Karl Seguin said:
One quick trick is to add a querystring to the image Url.

myImage.ImageUrl = "someImage.jpg?id=" + someId.ToString();

if someId is unique each request, the browser shouldn't cache it.

Karl
 

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

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,828
Latest member
LauraCastr

Latest Threads

Top