Click here to Skip to main content
15,895,777 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How i can do that.

A have an aplication in C#
when i click the upload button, i what my image to bi uploaded to a server in a location, to remember the phat,

and then,

when i click the save button to save on the data in my database,

<b>I'm interested how to upload and remember the path.</b>

To save and read to database i now how.


tanks,
Posted
Updated 29-Jun-10 7:49am
v2

 
Share this answer
 
In order to upload a file to server use the below code. Assuming that you want to save the file in Upload folder in your website.


string path = Server.MapPath("~/Upload/");
FileUpload1.SaveAs(path+FileUpload1.FileName);//this will save the file in upload folder.
 
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