Made long time, completely according to the teaching material set Javascrip script, but is not show, later found that the original client to the site to be trusted to display.
So record it and check it later.
<script type= "Text/javascript" >
function Showphoto () {
Alert (document.getElementById ("FileUpload1"). Value);
Assigns the full path + file name of the selected picture to the preview control with "File:///r:\test.jpg" image1.src
Note: To set the client to trust this site, you can perform the script preview picture.
document.getElementById ("Image1"). src = document.getElementById ("FileUpload1"). Value;
}
</script>
<asp:fileupload id= "FileUpload1" runat= "Server" height= "19px" width= "222px" onchange= "Javascript:showphoto ();" />
<asp:image id= "Image1" runat= "Server" height= "93px" width= "103px" alternatetext= "no Picture selected"/>
C#.NET4 Construction Web page upload image before client preview picture cannot be displayed