Click here to Skip to main content
15,907,225 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
See more:
How to Upload Image in ImageControle directly through FileUpload Controle?
Posted
Comments
parmar_punit 26-May-11 10:07am    
Kindly see my solution... it will certainly helpful to you.....

1 solution

you have to save image in your solution or you have to upload the image anywhere else....
after that you are able to show an image in image control.... like.......

fileUpload1.PostedFile.Save(Server.MapPath("Image")+"/fileName.jpg");
image1.Image = @"Image/fileName.jpg"; // this is relative path you can give here full path by using MapPath static method of Server class...
 
Share this answer
 
Comments
Narendra G. mane. 30-May-11 7:31am    
Sir i know this code but, i'am not understanding that on which event i have to keep this code so image will get uploaded on ImageControle as soon as selecting the image on FileUploadControle n perss the Ok butten.

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