在SDK中有如下张表格我们写法完全是依托在此基础的上
Name Format
Attachments .Boolean
Boolean .Boolean
Calculated N/A
Choice .String
Computed N/A
Counter .Int32
CrossProjectLink .Boolean
Currency .Double
DateTime .DateTime
GridChoice .String
Guid .Guid
Integer .Int32
Lookup .String
MaxItems .Int32
ModStat .Int32
MultiChoice .String
Note .String
Number .Double
Recurrence .Boolean
Text .String
Threading .String
URL .String, .String
User .String
这张表格显示了在WSS中各种字段类型和.NET中对应数据类型对照关系根据这个我们就可以方便写出<Field>元素中内容了
比如我们现在要Add或Update个URL类型字段可以这样书写Field:
<FieldName="SomeUrl">http://www.example.com,Example</Field>
该例中某列表项SomeUrl字段是链接类型我们要写个链接到这个字段该链接地址为“http://www.example.com”标题为“Example”
注意:对于链接类型字段由于标题可以不填(这样系统会默认以地址内容作标题这点和许多文本编辑器相同)所以上面例子也可以这样写:
<FieldName="SomeUrl">http://www.example.com,</Field>
再如我们现在要Add或Update个选项类型字段可以这样书写Field:
<FieldName="Status">已完成</Field>
任务列表中状态字段就是选项类型由于其对应是.String所以可以直接这么写
最新评论