4

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..!

SHEKHAR SHETE
  • 5,964
  • 15
  • 85
  • 143

1 Answers1

1

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.