Click here to Skip to main content
15,896,730 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to preview image immediatley after selecting image using fileupload controls (or) ajax file upload control which works on IE 8. please help me.
Posted

1 solution

Set image Field Below to the Upload Control.
and set the Imageurl when you Upload a file

C#
protected void btnUpload_Click(object sender, EventArgs e)
{
    FileUpload1.SaveAs(Server.MapPath("test.jpg"));
 
    Image1.ImageUrl = "~/test.jpg";

}
 
Share this answer
 
v3
Comments
Baroor 20-May-14 8:57am    
i dont want to use any extra buttons, preview should happen immediatley after selecting image.

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