Click here to Skip to main content
15,891,905 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
yesterday I made an answer but nobody could not understand me, the point is that in my aplication the user can choose an image on his local directory or internet and I want to save the client selection url in my database(already how to do that) and at the same time save the photo on my local directory(.jpg) because if in a close future the user delete the picture on his local directory, i'll lost the picture, so when the user choose the picture i'll get the url and I need to copy the picture on my local directory(it is my problem), for showing after in a view. Please I hope that someone can help me. Thanks
Posted
Updated 2-Oct-14 9:33am
v2
Comments
ZurdoDev 2-Oct-14 14:51pm    
We are always eager to help but you have to ask something specific. Where are you stuck?
So, you are going to save image path in database. And when you say, you will store it in your local directory, what does that mean exactly?
PIEBALDconsult 2-Oct-14 15:16pm    
If you didn't get an answer you liked yesterday, then why ask again today?
ZurdoDev 2-Oct-14 15:39pm    
What's important is not how often we fall down. What is important is how often we get back up. :)
PIEBALDconsult 2-Oct-14 16:31pm    
Not if you keep tripping over the same impediment rather than going around/over it.

C#
if (FileUpload1.HasFile)
        {
            FileUpload1.SaveAs(Server.MapPath("YourFolderName/" + FileUpload1.FileName));
        }



Note: Here Give Your folder Name where you want to store image.

Thanks
AARIF SHAIKH
 
Share this answer
 
Below answer is according to my understanding about your question

When you are getting the path of image from client machine, write some code that will upload that image to server. Then it ll be in your access. Further you can have the image on your local directory too.
 
Share this answer
 
v2

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