SharePoint 2007:如何使用Web服务从列表名称获取列表URL?

时间:2010-01-19 12:46:34

标签: sharepoint moss wss

我有一个MOSS列表,如何仅使用Web服务方法从列表名称中获取列表的URL?

1 个答案:

答案 0 :(得分:3)

对于没有文件的下一个可怜的傻瓜:

/// <summary>
        /// The SharePoint Web Service: Lists.
        /// </summary>
        private readonly sharepoint.lists.Lists wsLists = new sharepoint.lists.Lists();

private string GetListUrlFromName(string listName)
        {
            XmlNode node = wsLists.GetList(listName);
            return node.Attributes["RootFolder"].Value; 
        }