Click here to Skip to main content
15,884,986 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,
I have successfully implemented the functionality of displaying image preview of the image being uploaded before actually saving the image by reading the article Show image preview before actually uploading the image in asp.net
Its works like charm. But when post back occurs on the page then the preview disappears. Is there any solution to maintain the image preview even after postback?
Posted
Updated 19-Aug-15 19:01pm
v2
Comments
Suvendu Shekhar Giri 20-Aug-15 1:49am    
May be, instead of complete page post back, doing partial postback through ajax update panel can help .

1 solution

<asp:updatepanel runat="server" id="UP1" >
<content tempalte="">
<asp:fileuplaoad runat="server">
</content>
<trigger>
<asynchronouspostbacktrigger contolid="Event to submit or update buttons or as per ur need">
</asynchronouspostbacktrigger></trigger>
</asp:fileuplaoad></asp:updatepanel>
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900