Link to home
Start Free TrialLog in
Avatar of BKennedy2008
BKennedy2008

asked on

SharePoint EventReceiver tying to a specific Document Library (Custom)

I want to take an event receiver and tie it to a specific Document Library that is created on about 10 out of 20 sites called "ApprovedDocuments". The eventReceiver works fine, however, when I modify the elements.xml from   <Receivers ListTemplateId="101"> to
<Receivers ListUrl="Lists/ApprovedDocuments"> from instructions on how to tie to a specific list, I get the follwing error when I deploy the testDB

Error      1      Error occurred in deployment step 'Activate Features': <nativehr>0x80070002</nativehr><nativestack></nativestack>
            0      0      TestDB

Any ideas I can look for in this, or another way to tie a eventreceiver to a specific list?
Thanks
ASKER CERTIFIED SOLUTION
Avatar of Rainer Jeschor
Rainer Jeschor
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BKennedy2008
BKennedy2008

ASKER

VS2010, I tried the first solution with no luck. I will work through the second solution.
Thanks
Thanks again - Next time I will hire you as a consultant....

Just wrapping it with : If (properties.List.Title = "Approved Documents") Then

do something....


Thanks