[link](http://stackoverflow.com/questions/4459379/preview-an-image-before-it-is-uploaded) Please take a look at the sample JS code below: ``` javascript function readURL(input) { if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function (e) { $('#blah').attr('src', e.target.result); } reader.readAsDataURL(input.files[0]); } } $("#imgInp").change(function(){ readURL(this); }); ``` and the associated HTML: ``` HTML <form id="form1" runat="server"> <input type='file' id="imgInp" /> <img id="blah" src="#" alt="your image" /> </form> Also, you can try this sample here. ```
Activity