| .NET DotNet Forum Index » General Discussion » how to create and upload files... |
|
Page 1 of 1 |
|
| Author |
Message |
| eppiem... |
Posted: Wed Oct 28, 2009 2:14 pm |
|
|
|
Guest
|
| Can someone tell me step by step how to create files and upload them? |
|
|
| Back to top |
|
|
|
| Family Tree Mike... |
Posted: Wed Oct 28, 2009 2:32 pm |
|
|
|
Guest
|
eppiem wrote:
Quote: Can someone tell me step by step how to create files and upload them?
That's a little vague. It could be as simple as:
string text = "This is a test";
File.WriteAllText( at (no spam) "c:\test\test.txt", text);
WebClient wc = new WebClient();
// the following may be necessary
wc.Credentials = new NetworkCredential("someusername", "somepassword");
wc.UploadFile("ftp://ftp.somesite.com/test.txt", at (no spam) "c:\test\test.txt");
--
Mike |
|
|
| Back to top |
|
|
|
|