读取堆栈跟踪时:
[FormatException: Input string was not in a correct format.]
System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +2755599
System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +112
System.Convert.ToInt32(String value) +68
Run Code Online (Sandbox Code Playgroud)
+68,+ 112等数字是什么意思.我猜他们已经抵消了什么.如果是这样,什么?
我最近才注意到FilterSharePoint 事件接收器的定义文件中的元素:
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Receivers>
<Receiver>
...
<Filter />
</Receiver>
</Receivers>
</Elements>
Run Code Online (Sandbox Code Playgroud)
SPEventReceiverDefinition.Filter属性的 MSDN 文档说该值:“代表 SPListItem 对象的过滤器”。并包括以下备注:
“事件处理程序在网站或网站集级别注册以实施过滤以响应列表项事件。过滤允许按顺序应用多个规则以限制列表的大小或该列表的其他维度。它们在以赋值语句的形式作为名称-值对的持久存储。”
我的问题是:如何设置过滤器的值?你会使用 CAML<Where>元素吗?
在这个阶段我只是好奇。我没有理由使用它,但看到它并开始怀疑。我搜索了 SharePoint 12 'hive' 文件夹中的所有事件接收器定义,但没有一个应用过滤器。