Image Update Problem
-
Hi, I have an image, file upload and a button control on my webform. I am uploading a new image and attaching the image to replace my existing image in button click event. It seems to work fine on my local machine. When I deploy and run on the server side, the image upload is working fine, the image is getting replaced in the background. However my web page still shows old image. If I reload the page then it shows the updated image. I am using the same name for the image when I am doing save as in the button click event. Any inputs why this is happening? Appreciate inputs Raj D
Raj D
-
Hi, I have an image, file upload and a button control on my webform. I am uploading a new image and attaching the image to replace my existing image in button click event. It seems to work fine on my local machine. When I deploy and run on the server side, the image upload is working fine, the image is getting replaced in the background. However my web page still shows old image. If I reload the page then it shows the updated image. I am using the same name for the image when I am doing save as in the button click event. Any inputs why this is happening? Appreciate inputs Raj D
Raj D
dasumohan wrote:
If I reload the page then it shows the updated image
Because you are manually refresing the web page. For example, if you had a function in your script block to refresh the images in every 15 seconds in the web page, you wouldn't have to refresh the whole page to see if the uploaded images sucessfully replaced. Just an idea... :wtf:
What a curious mind needs to discover knowledge is noting else than a pin-hole.
-
Hi, I have an image, file upload and a button control on my webform. I am uploading a new image and attaching the image to replace my existing image in button click event. It seems to work fine on my local machine. When I deploy and run on the server side, the image upload is working fine, the image is getting replaced in the background. However my web page still shows old image. If I reload the page then it shows the updated image. I am using the same name for the image when I am doing save as in the button click event. Any inputs why this is happening? Appreciate inputs Raj D
Raj D
dasumohan wrote:
However my web page still shows old image.
Because the browser has cached the page and your seeing that cached page. You have to set metatag information telling the browser to not cache the page or shorten the time that the cached page is valid. I have no idea how to do it because I don't do that much web developement. Your best bet is to ask in the ASP.NET Forum.
Dave Kreskowiak Microsoft MVP - Visual Basic