Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to save picture box image in folder which contains in solution explorer folder image and retrive image and display in picture box in C# windows application

i want to save in folder(Folder name:Image) only...that folder(Folder name:Image) is in solution explorer...if i copy my project to other drive...how to save image...it show error kmow...
Posted
Updated 4-Apr-18 1:27am
v2
Comments
manognya kota 15-Feb-12 2:26am    
Its little unclear.From where do you want to save to where ? and from where you want to retrieve and display?
kaushikjoshi 15-Feb-12 2:42am    
please clear the question.
Do you want to save image in a folder and path save to sql after that retrieve or any other way?
itsureshuk 15-Feb-12 5:25am    
i want to save in folder(Folder name:Image) only...that folder(Folder name:Image) is in solution explorer...if i copy my project to other drive...how to save image...it show error kmow...
ProEnggSoft 15-Feb-12 6:53am    
You can use Application.StartupPath property. See solution 2

Regarding saving the file to a folder under your solution,
you can use the Application.StartupPath property. This gives the folder of the executable file of the application. e.g.
C#
pictureBox1.Image.Save(Application.StartupPath + "\\Image\\picture1.jpg");



PES
 
Share this answer
 
Comments
Deoki Nandan 26-Mar-12 6:04am    
If I want to save filename as text of textbox containing name of person then what will I have to do ? please reply ASAP. I need it.
AchyuthaAA 13-Jun-13 8:00am    
how to save image in a particular folder in wpfpage "image.save" is not the correct option.
Please help me.
You can use the PictureBox class's ImageLocation property to load image from a file into the picture box and use PictureBox.Image.Save method to save the image of the PictureBox to a file. You can see an example here.
http://stackoverflow.com/questions/1063505/c-sharp-how-to-save-a-picturebox-control-as-a-jpeg-file-after-its-edited[^]

If your problem is solved you may accept the solution, otherwise please post your queries.

PES
 
Share this answer
 
v2
Comments
ProEnggSoft 15-Feb-12 5:27am    
Thank you :)

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