views:

43

answers:

1

Hi

I want to make a local program in C# that manages files between multiple users. I want to utilize the file upload option supported by HTML Form/PHP from within a .net application, but I'm not sure how to go about doing this. Even a starting point would be awesome.

All my google searches return using the HTML Form upload from within a web browser, but I'm looking to use the same upload feature directly from a local .net application.

Thanks

Kurru

A: 

The UploadFile function is a good starting point:

using (var client = new WebClient())
{
    byte[] result = client.UploadFile(
        "http://foo.com/upload.php", 
        @"c:\work\foo.txt"
    );
}
Darin Dimitrov