2

I have this webdav code thats creating folders in SharePoint:

HttpWebRequest request = (System.Net.HttpWebRequest)HttpWebRequest.Create(folderAddress);
                request.Credentials = wsLists.Credentials; // CredentialCache.DefaultCredentials;
                request.Method = "MKCOL";
                response = (System.Net.HttpWebResponse)request.GetResponse();
                response.Close();

How can I change the code now to upload a file now to this newly created folder. I think this is a generic webdav question, thanks

4

1 回答 1

3

您应该可以使用WebClient.UploadFile做到这一点

另请参阅使用 HttpRequest 的问题:webclient-upload-file-error

或谷歌搜索WebClient.UploadFile webdav

于 2009-10-27T15:09:15.693 回答