Click here to Skip to main content
15,884,836 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
Hello,

How to "FileUpload" click event fire on Image click for upload and display imege in image box, using c# asp.net web application?

Please help me.

Thanks in Advance.

Ankit Agarwal
Web Developer
Posted
Updated 16-Dec-13 22:46pm
v2

there is good demo of jquery plugin for uploading and preview image with file upload control

http://blueimp.github.io/jQuery-File-Upload/[^]
 
Share this answer
 
Comments
[no name] 17-Dec-13 5:46am    
I have a Image control and display inage in this control on this image control click event.
protected void Upload_Click(object sender, EventArgs e)
{


if (FileUpload1.HasFile)
{
string filename = FileUpload1.FileName;
FileUpload1.SaveAs(Server.MapPath("~/App_Themes/Theme1/") + filename);
Image1.ImageUrl = @"~/App_Themes/Theme1/" + filename;
lblimage.Text = @"~/App_Themes/Theme1/" + filename;

}
}
 
Share this answer
 

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