Last post Aug 10, 2017 05:12 AM by A2H
Aug 10, 2017 02:24 AM|vstorpedo|LINK
I do have a page where I upload, delete or view pictures. The problem that I'm having is that does not matter how many times i delete the picture or upload another one the browse always display the same one. I checked the file where picture are stored and
the right one is there but the browser keep displaying the old one. I think that that have to do something with the browser cache or memory. I added the following code to the page on Page_Load but is not working anyway. This is the code:
Do anybody have any idea of what is going on? Thanks for helping.
Aug 10, 2017 05:12 AM|A2H|LINK
I checked the file where picture are stored and the right one is there but the browser keep displaying the old one.
If you are loading pictures on image tag then add a random dummy value to the code where you refer the image so the always the latest file will get loaded.
<img src="<%= ResolveUrl("image.jpg") + "?rdvalue=" + DateTime.Now.ToString("mmddyyyyhhmmss")%>" />