当我更新图像时,更新的图像不会在图像中闪烁 [英] When I update the image, updated image is not shwing in imageurl

查看:96
本文介绍了当我更新图像时,更新的图像不会在图像中闪烁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用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

推荐答案

最简单的解决方案是更改图片网址,以便每次获得唯一的网址。

尝试以下示例 -

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



如果这没有用,请告诉我。



谢谢


If this doesn't help then let me know.

Thanks


这篇关于当我更新图像时,更新的图像不会在图像中闪烁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆