问题描述
我使用fileupload上传图像并以imageurl显示。
但是当我更新图像时它仍然显示以前的图像。
我已通过断点图像检查url valus是coorect,图像名称是正确的。甚至在我保存图像的文件夹中,更新后我用新图像替换旧图像但仍然显示以前的图像。但有一件事我注意到每当我清理浏览器的所有cookie时它的工作。但每当我更新图像仍然显示以前的图像。实际上我不知道如何解决这个问题。
我有什么尝试过:
我尝试了会话或viestate.but而不是geeting解决方案在imageurl中显示更新的图像
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
推荐答案
MyImage.ImageUrl ="Images/NewImage1.jpg?" + DateTime.Now.Ticks.ToString();
如果这没有用,请告诉我。
谢谢
If this doesn't help then let me know.
Thanks
这篇关于当我更新图像时,更新的图像不会在图像中闪烁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!