Image

  • Thread starter Thread starter Roberto Carcione
  • Start date Start date
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
 
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
 
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
 
Back
Top