0

i want to preview an image as soon as it is uploaded. i am using ASP.NET FileUpload control and this is what i have done so far.

    <script type="text/javascript">
    function callPostBack() {
        var uploadControlFileUploader = document.getElementById('<%=   FileUploadThumbnailImage.ClientID%>');
            var path = uploadControlFileUploader.value; alert(path);
            document.getElementById("ImageThumbnail").src = path;

            return false;


    }
</script>

when i run this code in localhost it works fine. but when i published it in iis it's not working. i want to do this using javascript. can anyone help me (ImageThumbnail is the ID of my preview button).

2

1 Answer 1

0

you can get the solution from here-
http://forums.asp.net/t/1740831.aspx/1?Preview+Image+before+upload+

and look into here too

Upload and preview image in client side without posting back

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.