Put an upload control and an image control on the page.
<Asp: FileUpload ID = "FileUpload1" runat = "server" onpropertychange = "show (this. value)"/>
<Asp: Image ID = "Image1" runat = "server"/> 2. Write onpropertychange = "show (this. value) "event, call the show function in js, and pass its parameters to js.
<Script type = "text/javascript">
Function show (id)
...{
Document. getElementById ("Image1"). src = id;
}
</Script> Ie6, Ie7 passed the test (note to implement through the filter)
<Div id = "divview" style = "filter: progid: DXImageTransform. Microsoft. AlphaImageLoader (sizingMethod = image); WIDTH: 166px; HEIGHT: pixel PX">
<! -- Used to display images -->
</Div>
<Asp: FileUpload ID = "FileUpload3" runat = "server" onpropertychange = "show1 (this. value)"/>
<Script type = "text/javascript">
Function show1 (upimg)
...{
Var dd = document. getElementById ("divview ");
Dd. filters. item ("DXImageTransform. Microsoft. AlphaImageLoader"). src = upimg;
Dd. style. width = 166;
Dd. style. height = 190;
Dd. filters. item ("DXImageTransform. Microsoft. AlphaImageLoader"). sizingMethod = scale;
}
</Script>