繁体   English   中英

如何使用 c# 获取 sharepoint 的第一个文件的 href 和 label 以及如何下载 Z2D60FC67EF371D40B7637909 的第一个文件

[英]How to get href and label of first file of sharepoint using c# and how to download fist file of sharepoint

我是 c# 的新手。 帮助我如何获得 SharePoint href 和 label 值。 如何从 SharePoint 下载第一个文件。

  String url="MYURL"
   string fileName = "MYFILENAME", myStringWebResource = null;
   WebClient myWebClient = new WebClient();
     myStringWebResource = remoteUri + fileName;

  Console.WriteLine("Downloading File \"{0}\" from \"{1}\" .......\n\n", fileName, myStringWebResource);

  myWebClient.DownloadFile(myStringWebResource,fileName);   

   Console.WriteLine("Successfully Downloaded File \"{0}\" from \"{1}\"", fileName, myStringWebResource);

     Console.WriteLine("\nDownloaded file saved in the following file system folder:\n\t" + path);

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM