Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
Hi,
I want to save image in database from a image control in asp.net c#
Posted
Comments
Deepu S Nair 21-May-15 2:08am    
Use Google
You should try something on your own and if you face any issues, then come back and ask question here. We will help you for sure.
Sinisa Hajnal 21-May-15 6:44am    
What have you tried? Show the code you wrote that doesn't work as you expect it to.
Karthik Holla 21-May-15 7:13am    
You can get the path of the image (Which is stored in your local path). Store it in database. When you want to load image just load image using that path. It worked for me. You should not change the path. There are many built in to get loaded image path and load image from specific path.
[no name] 26-May-15 7:07am    
yes..

Already another thread solved this issue.Look 


Save image to a folder from an asp:Image control[^]
 
Share this answer
 
string FileName = Path.GetFileName(FileUpload1.PostedFile.FileName);
FileUpload1.SaveAs(Server.MapPath("~/Image/" + 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