Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
i am uploading the image using fileupload and displaying in imageurl.
But when I update the image then its still showing previous image.
I have checked through breakpoint image url valus is coorect,image name is correct.even in which folder I am saving image,after updating I am replacing the old image with new image but still its showing previous image.But one thing I noticed whenever I am cleaning all cookies of browser its working.But whenever I update the image still its showing previous image.Really I dont'have idea about how to solve this issue.

What I have tried:

I have tried session or viestate.but not geeting solution to display the updated image in imageurl
Posted
Updated 14-Sep-16 20:17pm

1 solution

The easiest solution is to change the image url so that everytime it gets an unique URL.
Try something like following example -
C#
MyImage.ImageUrl ="Images/NewImage1.jpg?" + DateTime.Now.Ticks.ToString();

If this doesn't help then let me know.

Thanks
 
Share this answer
 
Comments
Karthik_Mahalingam 15-Sep-16 7:09am    
5
Suvendu Shekhar Giri 15-Sep-16 7:28am    
Thanks Karthik :)
Karthik_Mahalingam 15-Sep-16 10:41am    
wc :)
Pragya Nagwanshi 5-Oct-16 6:04am    
Thank u so much Karthik

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900