PROKA Posted July 5, 2005 Posted July 5, 2005 1 -> I have an image : Image1.ImageUrl = "image.jpg" 2 -> my page does some operations and replaces that image.jpg with another image.jpg 3 -> the user clicks a "preview" button to see the new image but the page shows the old image, on page reload. I tried to disable cache, still it doesn't work. It works if I press F5 ( Refresh ) Any ideeas ? :( Quote Development & Research Department @ Elven Soft
a_jam_sandwich Posted July 5, 2005 Posted July 5, 2005 Eh you have lost me can you upload you code again and explain your process fully Cheers Andy Quote Code today gone tomorrow!
PROKA Posted July 5, 2005 Author Posted July 5, 2005 (edited) Run this project it'll show an image in the ImageBox now manually change the image.gif file with another image.gif ( you have a directory GIFs to pick from ... just rename and over-write) and click the button the image doesn't change :( Edited March 13, 2007 by PROKA Quote Development & Research Department @ Elven Soft
a_jam_sandwich Posted July 5, 2005 Posted July 5, 2005 I see what you mean the only way I have managed to force a change is to use the .image as "image.gif?" & Now.ToString This will work but also means that if the same image appears twice it will be loaded twice and never cached. To test i have used the following code Dim files() As String = IO.Directory.GetFiles(Server.MapPath("gifs")) IO.File.Copy(files((Rnd() * UBound(files))), Server.MapPath("image.gif"), True) Image1.ImageUrl = "image.gif?" & Now.ToString Hope that this helps Andy Quote Code today gone tomorrow!
PROKA Posted July 5, 2005 Author Posted July 5, 2005 Thanks it works perfectly with the "?" & Now.ToString ... that's what I needed thank you again Andy, you kinda rule :) Quote Development & Research Department @ Elven Soft
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.