Upload and preview image in client side without posting back
Posted
by Ahmy
on Stack Overflow
See other posts from Stack Overflow
or by Ahmy
Published on 2010-06-12T12:56:22Z
Indexed on
2010/06/12
13:02 UTC
Read the original article
Hit count: 222
ASP.NET
|client-side
I need to upload an image and then preview it without posting back as i need to have a file upload control(even HTMLinputfile or ASPfileupload) then the user will browse to select image after selecting (browsing) there will a button(HTMLInputButton) that will save the uploaded image and preview it.
I have the following code :
<div>
<input id="UploadInput" type="file" value="Upload" />
<br />
<input id="PreviewBtnInput" type="button" value="Preview" onclick="ShowPreview()" />
<br />
<img id="ImgUploaded" />
</div>
So how can i do this task ?
Thanks in advance for any reply but please if any one has a link for article that talk about this issue please i need a clear code not article details.
© Stack Overflow or respective owner