Problem
The problem is,
Image1
Control is not declared on the Page.
Solution
Script
<script type="text/javascript">
function showimagepreview(input) {
if (input.files && input.files[0]) {
var filerdr = new FileReader();
filerdr.onload = function (e) {
$('#<%= Image1.ClientID %>').attr('src', e.target.result);
}
filerdr.readAsDataURL(input.files[0]);
}
}
</script>
HTML
<asp:FileUpload ID="FileUpload1" runat="server" onchange="showimagepreview(this)" />
<img id="Image1" alt="uploaded image preview" />