Reputation: 6066
I am new to webclient
.
I have seen some examples to POST
data to a server
. I am worrying which one to be used over other. Can any one please tell me what to use when?
UploadData:
system.net.webclient.uploaddata(uri, byte[]);
DownloadString:
WebClient client = new WebClient();
var result = client.DownloadString(someurl);
Suggestions welcome..!
Upvotes: 4
Views: 1107
Reputation: 11
the basic difference between both - Uploaddata method can be used to retrieve data based on provided inputs from specified URI(address of service) while DownloadString can be used to retrieve data without sending any inputs parameters.
Upvotes: 1