1

我需要使用 WinForms 或 WPF 中的自定义模板创建 SharePoint 2010 列表。

我使用 Web 参考 ../_vti_bin/lists.asmx(称为 ListsService):

ListsService.Lists listWebService = new ListsService.Lists(); 
listWebService.Url = "<na-na-na>/_vti_bin/Lists.asmx";   
listWebService.Credentials = System.Net.CredentialCache.DefaultCredentials;
 //Call AddList method of Web service to create new list
XmlNode result = listWebService.AddList("TestList", "Test Description", 100);`

在 AddList 方法中,应该定义 templateID,但是,网站上有很多自定义模板具有相同的 ID = 100。因为,我猜,这意味着这是一个“通用列表”。因此,在创建列表时,不会对其应用任何模板。

请告诉我应该怎么做才能获得我需要的确切模板?

4

0 回答 0