实现方法:
HTML:
<asp:FileUpload ID="fupTmpPic" runat="server" onchange="onFileChange(this);" />
<asp:Image ID="imgDimensionalPic" runat="server" />
JS:
<script type="text/javascript">
function onFileChange(sender) {
document.getElementById("imgDimensionalPic").src = window.URL.createObjectURL(sender.files[0]);
}
</script>
例: