您的位置:首页 > 其它

SharePoint 中的列表定义类型名字及其对应的id(SPListTemplateType )

2011-09-23 13:25 281 查看
sharepoint 中列表及列表中的对象都有对应的名字和id,比如104表示通知列表,105表示联系人列表。

其他可以参考: http://msdn.microsoft.com/zh-cn/library/microsoft.sharepoint.splisttemplatetype

http://hi.baidu.com/sygwin/blog/item/e390f7f225638807b17ec53e.html#0

http://www.davehunter.co.uk/Blog/Lists/Posts/Post.aspx?ID=68

知道里上面的信息,在判断一个列表是的类型就好办多了。假如,如何判断一个列表是通知列表

Splist List=web.List["name"]
if (List.BaseTemplate == SPListTemplateType.Announcements)

//is announcement

参考:http://social.technet.microsoft.com/Forums/zh-CN/sharepointdevelopment/thread/1983d00a-9ec1-4c45-a207-a45e8ab5b0fb
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: