Asp.net图像控制问题
我的图像控件有一个问题,即当我上传图像时,它显示该图像,但是当我更新它时,它在数据库中更新时显示旧图像我认为它从缓存获取图像是否有任何技术可以处理这个问题,请告诉我?
Image1.ImageUrl = populatedata.ResultSet.Tables[0].Rows[0][12].ToString();
string file_ext = Path.GetFileName(Image1.ImageUrl);
Image1.ImageUrl = "~/EmpImages/" + file_ext;
谢谢
I have a problem with my image control that is when I upload an image it shows that image but when I update it, its shows old image while updates in database I think it gets image from cache is there any technique to handle this issue kindly tell me?
Image1.ImageUrl = populatedata.ResultSet.Tables[0].Rows[0][12].ToString();
string file_ext = Path.GetFileName(Image1.ImageUrl);
Image1.ImageUrl = "~/EmpImages/" + file_ext;
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试在网址末尾添加随机查询字符串值吗?
IE
这不会导致它对图像发出新的请求吗?
Could you try adding a random querystring value on the end of the url?
IE
Wouldn't this cause it to make a new request for the image?