Sharepoint ListTemplateId
2009-01-05 10:58 Virus-BeautyCode 阅读(252) 评论(0) 编辑 收藏 举报
在注册EventHandler时 需要用到下面的XML
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Receivers ListTemplateId="104">
<Receiver>
<Name>EventHandler Delete</Name>
<Type>ItemDeleting</Type>
…
其中ListTemplateId的值一直不清楚怎么写,干脆一次搞清楚,
用代码列出来
string[] typeNames = System.Enum.GetNames(typeof(SPListTemplateType));
Array typeValues = System.Enum.GetValues(typeof(SPListTemplateType));
int j = 0;
foreach (int i in typeValues)
{
Console.WriteLine(typeNames[j++].ToString() + " " + i.ToString ());
}
下面就是得到的结果了
以后再用到的懒得去查了。
参考资料地址:http://weblogs.asp.net/pschneider/archive/2006/11/22/sharepoint-listtemplateid.aspx
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Receivers ListTemplateId="104">
<Receiver>
<Name>EventHandler Delete</Name>
<Type>ItemDeleting</Type>
…
其中ListTemplateId的值一直不清楚怎么写,干脆一次搞清楚,
用代码列出来
string[] typeNames = System.Enum.GetNames(typeof(SPListTemplateType));
Array typeValues = System.Enum.GetValues(typeof(SPListTemplateType));
int j = 0;
foreach (int i in typeValues)
{
Console.WriteLine(typeNames[j++].ToString() + " " + i.ToString ());
}
下面就是得到的结果了
Here is the list:
GenericList 100
DocumentLibrary 101
Survey 102
Links 103
Announcements 104
Contacts 105
Events 106
Tasks 107
DiscussionBoard 108
PictureLibrary 109
DataSources 110
WebTemplateCatalog 111
UserInformation 112
WebPartCatalog 113
ListTemplateCatalog 114
XMLForm 115
MasterPageCatalog 116
NoCodeWorkflows 117
WorkflowProcess 118
WebPageLibrary 119
CustomGrid 120
DataConnectionLibrary 130
WorkflowHistory 140
GanttTasks 150
Meetings 200
Agenda 201
MeetingUser 202
Decision 204
MeetingObjective 207
TextBox 210
ThingsToBring 211
HomePageLibrary 212
Posts 301
Comments 302
Categories 303
IssueTracking 1100
AdminTasks 1200
参考资料地址:http://weblogs.asp.net/pschneider/archive/2006/11/22/sharepoint-listtemplateid.aspx