Skip to main content
 首页 » 编程设计

c#之Sharepoint 2010 将字段添加到列表定义

2024年02月23日16shangdawei

我有一个列表定义:

<?xml version="1.0" encoding="utf-8"?> 

name of the List Definition project item, an error will occur when the project is run. --> 
  <ListTemplate 
      Name="LogsList" 
      Type="10004" 
      BaseType="0" 
      OnQuickLaunch="TRUE" 
      SecurityBits="11" 
      Sequence="410" 
      DisplayName="Logs List" 
      Description="Log instances for messages" 
      Image="/_layouts/images/itgen.png"/> 
 
</Elements> 

如何添加字段?我尝试了一些方法,但部署后字段没有出现。

请您参考如下方法:

您必须创建字段定义,创建一个或多个内容类型,然后添加字段定义并将这些内容类型添加到您的列表中。