SharePoint& Visual Studio - 事件处理程序 - ListItemProperties == NULL

时间:2011-06-07 13:59:44

标签: sharepoint sharepoint-2010

在这里引用我的博客:http://myspexp.com/2011/06/06/event-receiversits-not-always-as-easy-as-1-2-3/我无法获得ListItem的属性,你有什么建议?

1 个答案:

答案 0 :(得分:2)

在ItemAdding中,还没有properties.ListItem - 项目尚未保存。要修改要保存的内容,您必须修改properties.AfterProperties - 这仅适用于列表,在文档库的ItemAdding中,AfterProperties也不可用。

查看http://www.synergyonline.com/blog/blog-moss/Lists/Posts/Post.aspx?ID=25了解详情。