Image Control again showing same file?
-
I am developing an application in ASP.NET 1.1. on one page I allow the user to upload and delete the files to the server. When I delete the file, I physically delete the file from the location. Then I again prompt the user to load a new file but I save the file with the same name the earlier image file had been saved. The problem is that when I again upload the page through Response.Redirect after uploading, it is showing the same image it was showing before deletion whereas in that location on server, there is another image. How my view of the image in the Image Control will change when a new picture has come. Please give me any suggestion. All your suggestion are welcome. Thanks in advance
Thanks, Sandeep S. Sekhon
-
I am developing an application in ASP.NET 1.1. on one page I allow the user to upload and delete the files to the server. When I delete the file, I physically delete the file from the location. Then I again prompt the user to load a new file but I save the file with the same name the earlier image file had been saved. The problem is that when I again upload the page through Response.Redirect after uploading, it is showing the same image it was showing before deletion whereas in that location on server, there is another image. How my view of the image in the Image Control will change when a new picture has come. Please give me any suggestion. All your suggestion are welcome. Thanks in advance
Thanks, Sandeep S. Sekhon
Looks like the image is cached. Can you see the new image if you refresh the web page? There are a couple of work-around options that you may try: + Use another name for the new image. + Use a seperate web page or custom http handler to read the image data and send it to the output stream.