My question is correct or incorrect I don\'t know, but I would like to know if is it possible to return the value of UploadStringAsync() of post methods using WebClient?
<
You can use UploadStringCompleted event and get result in event handler. Once upload completes (failed or succeed) event is raised.
Attach
client.UploadStringCompleted
+= new UploadStringCompletedEventHandler (UploadStringCallback2);
Use:
void UploadStringCallback2(object sender, UploadStringCompletedEventArgs e)
{
//e.Result use it
}
If you want to return result of the upload you can wait for event to be raised like here
using AutoResetEvent