SHEKHAR SHETE
SHEKHAR SHETE

Reputation: 6066

What is basic difference between UploadData and DownloadString in asp.net webclient?

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

Answers (1)

Gorakhnath Choudhary
Gorakhnath Choudhary

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

Related Questions