惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
The GitHub Blog
The GitHub Blog
美团技术团队
Know Your Adversary
Know Your Adversary
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The Register - Security
The Register - Security
Stack Overflow Blog
Stack Overflow Blog
Attack and Defense Labs
Attack and Defense Labs
G
Google Developers Blog
I
InfoQ
博客园 - 司徒正美
T
Troy Hunt's Blog
Google DeepMind News
Google DeepMind News
J
Java Code Geeks
MongoDB | Blog
MongoDB | Blog
博客园 - 聂微东
A
About on SuperTechFans
云风的 BLOG
云风的 BLOG
S
Security Affairs
M
MIT News - Artificial intelligence
Simon Willison's Weblog
Simon Willison's Weblog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
T
Tailwind CSS Blog
量子位
Vercel News
Vercel News
月光博客
月光博客
V
Vulnerabilities – Threatpost
N
News and Events Feed by Topic
Hugging Face - Blog
Hugging Face - Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
L
LangChain Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
L
LINUX DO - 最新话题
F
Full Disclosure
The Hacker News
The Hacker News
Hacker News: Ask HN
Hacker News: Ask HN
T
Tor Project blog
A
Arctic Wolf
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Forbes - Security
Forbes - Security
IT之家
IT之家
Apple Machine Learning Research
Apple Machine Learning Research
B
Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Y
Y Combinator Blog
GbyAI
GbyAI
B
Blog RSS Feed
V
Visual Studio Blog
T
The Blog of Author Tim Ferriss
F
Fortinet All Blogs

博客园 - 叶子绿了

freemarker显示含有html代码的内容 .net sql 防注入 httpmodule [转载]poi导出excel,可以自定义保存路径 jquery ajax 传递js对象到后台 Struts2下多文件的上传与下载 dwr框架 Oracle 9i中包含Connect by 子句的查询向Oracle 10g移植后运行时错误及解决方法 JQuery Uploadify 基于JSP的无刷新上传实例 写了个用jquery控制select只读(select选项可以供用户查看但不能改变初始选中值) C#之模态窗口关闭 repeater相同行合并 在Web站点中创建和使用Rss源(动态) silverlight xml查询 silverlight 3 数据绑定及分页 解决UpdatePanel无法直接弹出窗口的问题 导入Excel数值读不到,找不到可安装的 ISAM错误! asp.net2.0 上传大容量文件第三方控件radupload 浏览器不能正常解析CSS代码的解决 ajax在用户注册中的应用,类似淘宝网
解决ASP.NET中Image控件不能自动刷新
叶子绿了 · 2010-04-28 · via 博客园 - 叶子绿了

在asp.net中使用image控件,当你想动态更换图片内容的时候,直接使用ImageUrl属性指向新的图片路径就行了(eg:Image.ImageUrl=imagepath)。但是当你更新了原来的图片内容而不是直接改变图片路径的时候,即使重修执行image1.ImageUrl=imagepath图片也不会更新。而且你按刷新也没有作用,图片依旧是原来的那张。

        不知道.net在判断ImageUrl属性的时候,为什么前后两次的路径都是一样,它就不改变,而且你强制Dispose都无效。原来解决的方法很简单,只需要在图片路径后面加上一个随机参数,就能使得服务器 认为图片改变了。eg:Image.ImageUrl   =  imagepath+ "?temp="+DateTime.Now.ToString() 这个例子用了当前时间作为随机数。