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

推荐订阅源

Google Online Security Blog
Google Online Security Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
C
CERT Recently Published Vulnerability Notes
C
Cybersecurity and Infrastructure Security Agency CISA
Cisco Talos Blog
Cisco Talos Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
Scott Helme
Scott Helme
Project Zero
Project Zero
E
Exploit-DB.com RSS Feed
S
Secure Thoughts
K
Kaspersky official blog
L
Lohrmann on Cybersecurity
NISL@THU
NISL@THU
WordPress大学
WordPress大学
N
News and Events Feed by Topic
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
L
LINUX DO - 热门话题
小众软件
小众软件
P
Privacy & Cybersecurity Law Blog
博客园 - 聂微东
Google DeepMind News
Google DeepMind News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
A
About on SuperTechFans
Hacker News: Ask HN
Hacker News: Ask HN
AWS News Blog
AWS News Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Hacker News: Front Page
F
Full Disclosure
Latest news
Latest news
Schneier on Security
Schneier on Security
The Hacker News
The Hacker News
T
Troy Hunt's Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Jina AI
Jina AI
Martin Fowler
Martin Fowler
P
Proofpoint News Feed
TaoSecurity Blog
TaoSecurity Blog
G
GRAHAM CLULEY
Forbes - Security
Forbes - Security
V
V2EX - 技术
酷 壳 – CoolShell
酷 壳 – CoolShell
V
Vulnerabilities – Threatpost
C
Cyber Attacks, Cyber Crime and Cyber Security
MongoDB | Blog
MongoDB | Blog
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
Hugging Face - Blog
Hugging Face - Blog
P
Privacy International News Feed
C
Check Point Blog
N
News and Events Feed by Topic

博客园 - point.deng

Pinax安装笔记 CuteEditor使用心得 asp.net 中的default button 悬浮的购物车 - point.deng - 博客园 DIV+CSS实现圆角 欢迎使用我的控件 有用的SQL语句,更新中~ asp.net 实现多语言界面 关于WebService中SOAP扩展求助~~ - point.deng - 博客园 同一账号多次登录 WEB自定义控件小记 C# 使用HOOK 小记 视频转为flv和图片 asp.net2.0用户和角色管理 javascript 练习 Ajax示例 asp.net开发小技巧 Master Page主题以及皮肤的使用 ASP.NET 2.0网站快速导航
Asp.net上传图片产生预览效果(转)
point.deng · 2008-03-10 · via 博客园 - point.deng

网上看到的,记一下。
第一种,在html中可以运行,但在asp.net 中出错:
<div id=viewImage></div>
 <asp:FileUpload ID="uper" runat="server" onpropertychange="show(this.value)" />
function show(va)
    {
        document.getElementById("viewImage").innerHTML="<img src="+va+" />";
    }
第二种,IE6、7都可以,
<div id="divview" style="filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=image);
            width: 166px; height: 190px">
        </div>
        <asp:FileUpload ID="uper" runat="server" onpropertychange="show1(this.value)" />
        <div>

 function show1(upimg)
    {
         var dd=document.getElementById("divview");
         dd.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = upimg;
         dd.style.width = 166;
         dd.style.height = 190;
         dd.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").sizingMethod = 'scale';
    }

这里的抄的别人的,不理解为什么,不过知道是通过滤器实现。

我不是最强的,但我是最努力的!