locked
EventReceiver binds to all lists! RRS feed

  • Question

  • Hi all,

    A few days ago I posted this problem: http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010general/thread/39dea8b5-3b09-4455-9e6b-b6193b5b146b

    I still have the same problem, but it's worse than I thought.

    Now I created a NEW project with a NEW event receiver. I removed the ListTemplateid="xx" from Elements.xml. In the featureActivated I bound one specific list to my newly created EventRecever. I deployed the project in a NEW Web application and made NEW lists. I'm debugging the code, and guess what!? The logic in my eventreceiver ItemAdding is executed on all lists!

    It seems the eventreceiver are bound to all lists, not only custom lists, as well.

    I'm blank (or blind).

    Thursday, October 28, 2010 4:38 PM

All replies

  • To clarify further:

    - My EventReceiver does not bind to all lists per se. It only acts like it's bound to them. Through logging/debugging/browsing/you name it, it is clear that the lists and eventreceivers are NOT connected (unless I specify). However; The code in my event receives are STILL executed for all the lists!

    Thursday, October 28, 2010 6:48 PM