Click here to Skip to main content
15,916,949 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hey, i was wondering if i could have a little advice.

I am trying to make a simple upload from in c# in a windows form application. It has to have a textbox and a upload button. I want the files to be stored in a pre specified directory.inwhich i wish to store the files (Not where the user wants to store it)

Any help would be amazing.

Thanks!
Posted
Comments
Orcun Iyigun 27-Feb-13 4:36am    
can not you do it in your button click event?What is hard?
Sandeep Mewara 27-Feb-13 11:05am    
And you need help with what? where are you stuck?

1 solution

Basically, you need to use the class System.Net.HttpWebRequest:
http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.aspx[^].

You can find many upload code samples, such as this one:
http://stackoverflow.com/questions/566462/upload-files-with-httpwebrequest-multipart-form-data[^].

Armed with these keywords, you can find a lot more: http://bit.ly/YXMnOj[^].

—SA
 
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