10
I want to upload file to a host by using WebClient class. I also want to pass some values which should be displayed in the $_POST array on the server part (PHP). I want to do it by one connect
I've used code bellow
using (WebClient wc = new WebClient())
{
wc.Encoding = Encoding.UTF8;
NameValueCollection values = new NameValueCollection();
values.Add("client", "VIP");
values.Add("name", "John Doe");
wc.QueryString = values; // this displayes in $_GET
byte[] ans= wc.UploadFile(address, dumpPath);
}
If i've used QueryString property, the values displayed in $_GET array.But i want to send it by post method