Home Download a document from Sharepoint 2010 via WebClient
Post
Cancel

Download a document from Sharepoint 2010 via WebClient

Here’s how I use the WebClient object to download a pdf from Sharepoint 2010:

1
2
3
4
5
6
string uri = "wwww.google.ca";
string filepath = "waffles.pdf";
 
WebClient wc = new WebClient();
wc.Credentials = loginCredentials;
byte[] generatedPdf = wc.DownloadData(uri + "/" + filePath);
This post is licensed under CC BY 4.0 by the author.