I have two custom list definitions - List 1 and List 2, both with different ID's for the Type in the elements.xml. List 1 is called 'List1' and the other is called 'List 2', note that the second list has a space in the name meaning the url has the %20 characters in it.
I have created List Event Receivers for each of the custom lists, as I understand it you need to set the ListUrl of the tag in order to get the event receiver firing only for the list at that Url.
My problem is that even with that set to ListUrl="Lists/List%202" or ListUrl="Lists/List 2" the event receiver still runs for the other list, in fact both event receivers run for any list created on the site - e.g. Custom List.
How do I get them to run for a particular list only?! Is it the space that is causing the issue? Even the other event receiver for the list with no space fires for all lists!
I tried also setting the ListTemplateOwner to the feature ID but that didn't work either.
Thanks in advance,
Alex