『DotNet吧』

『DotNet』

导航

uploadfile和Image实现图片预览

Posted on 2007-07-12 01:41  鱿鱼  阅读(427)  评论(2)    收藏  举报
因为没有CS事件可以用,所以结合html

一行代码搞定:

this.FileUpload1.Attributes.Add("onchange""document.getElementById('" + this.Image1.ClientID + "').src=document.getElementById('" + this.FileUpload1.ClientID + "').value");