ListItemEventHandler does not fire on the prospective list

Today I met a problem. I have several list definition in my project. I attached ListItemEventHandler to every list. Every List inherits from Custom List. I deploy the solution and create a Custom List on the deployed site. When I add an item to the Custom List, every eventhandler fire. I don't know what caused this and I didn't find the reason. After I recreate features, it works.

ListItem的事件接收器没有在预期的列表上触发

今天我遇到了一个问题。在我的工程里有几个列表定义,我在每个列表上添加了ListItem的事件接收器。每个列表定义都继承自自定义列表。我把解决方案部署之后,在目标站点上创建了一个自定义列表。当我向自定义列表里添加项目的时候,每个事件接收器都被触发了。我不知道什么造成了这个问题,没有找到原因。当我重建功能之后,它如期望地运行了。

Update: The reason is the feature's scope is site. I changed the socpe to web and it works.

更新:原因找到了,是因为功能的范围设置成了Site,改为Web就可以了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值