SharePoint:如何使用 Web 服务在文档库中创建文件夹

问题描述:

我需要在 SharePoint 的文档库中创建一个简单的文件夹,但我似乎找不到有关该主题的文档.

I need to create a simple folder in a document library in SharePoint, but I can't seem to find a scrap of documentation on the subject.

dws webservice 似乎是用来在工作区中创建物理文件夹的,我需要一种在文档库中创建文件夹的方法.

The dws webservice seems to be used to create physical folders in a workspace, I need a way to create a folder in a document library.

不知道该怎么办,请帮忙

Not sure what to do , please help

我发现这个方法有效:

    HttpWebRequest request = (System.Net.HttpWebRequest)HttpWebRequest.Create("http://mySite/MyList/MyfolderIwantedtocreate");
    request.Credentials = CredentialCache.DefaultCredentials;
    request.Method = "MKCOL";
    HttpWebResponse response = (System.Net.HttpWebResponse)request.GetResponse();
    response.Close();