Swapnil
asked on
ASP.net 2.0 fileupload and image overwritting
Hi Experts,
Controls used: Asp file upload control ,asp.net 2.0,IE/Mozilla
Newly uploaded Image doesnt appear on the browser window even after refreshing the page, if I upload a different image with the same filename as the previously uploaded one.
1) I have uploaded bipin.jpg to the server and preview displays bipin.jpg
2) I have changed an existing image rohan.jpg to the server and preview displays rohan.jpg
3) I have changed the name of rohan.jpg to bipin.jpg and try uploading and now the image displayed in the browser is still that of bipin.jpgs last content.(ideally it should display the photo of rohan as I just changed the image file name of rohans image to bipin)
I have tried with clearing cache in browser as well as in code but didn't work. please can you suggest me the solution for this weired behavior?
Regards,
NetSwap.
Controls used: Asp file upload control ,asp.net 2.0,IE/Mozilla
Newly uploaded Image doesnt appear on the browser window even after refreshing the page, if I upload a different image with the same filename as the previously uploaded one.
1) I have uploaded bipin.jpg to the server and preview displays bipin.jpg
2) I have changed an existing image rohan.jpg to the server and preview displays rohan.jpg
3) I have changed the name of rohan.jpg to bipin.jpg and try uploading and now the image displayed in the browser is still that of bipin.jpgs last content.(ideally it should display the photo of rohan as I just changed the image file name of rohans image to bipin)
I have tried with clearing cache in browser as well as in code but didn't work. please can you suggest me the solution for this weired behavior?
Regards,
NetSwap.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I have ?t=+ Guid.NewGuid().ToString() appended in URL.
Thanks Renju, It works.
Regards,
NetSwap.