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

I am new to webclient

. I've seen some examples for POST

data for server

. I'm worried which one should be used over the other. Can anyone tell me what to use when?

UploadData:

system.net.webclient.uploaddata(uri, byte[]);

      

DownloadString:

WebClient client = new WebClient();
var result = client.DownloadString(someurl);

      

Suggestions are welcome ..!

+3


source to share


1 answer


the main difference between the two is the Uploaddata method can be used to retrieve data based on the provided inputs from the specified URI (service address), while DownloadString can be used to retrieve data without sending any props.



+1


source







All Articles