Pardeep Malik

Pardeep Malik

  • NA
  • 138
  • 92.7k

Preview of image before uploading though fileupload

Apr 16 2013 3:14 AM
hi friends,

i want to generate preview before uploading it in website. To do that i try...

<script type="text/javascript">

function abc() {


var path = document.getElementById("FileUpload1").value;
document.getElementById("Image1").src = path;


}


</script>
//page....
<

div><asp:FileUpload ID="FileUpload1" runat="server" />
<br />
<asp:Image ID="Image1" AlternateText="Preview" runat="server" onchange="abc()" Height="191px" Width="173px" /></div>

but it didn't works....
please help me
Thankyou in advance....
Pardeep Malik

Answers (5)