I am trying to develop an Event Receiver for a document library titled Temporary. I have modified the Elements.xml document to look like this:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Receivers ListUrl="Temporary/Forms">
<Receiver>
<Name>CleanUpTemporaryItemAdded</Name>
<Type>ItemAdded</Type>
<Assembly>$SharePoint.Project.AssemblyFullName$</Assembly>
<Class>MeritSolutions.MAXLife.SP.CleanUpTemporary.CleanUpTemporary</Class>
<SequenceNumber>10000</SequenceNumber>
</Receiver>
</Receivers>
</Elements>
When I run the code to debug, it doesn't work - SharePoint Manager 2010 doesn't show that there are any receivers attached to the Temporary document library. I know that the key is in the ListUrl="Temporary/Forms"
line, but I can't get it to work. I tried with "Temporary"
, "/Temporary"
, "Temporary/Forms"
and "/Temporary/Forms"
, but nothing helped. My document library is hidden; does that have to do anything with it maybe? My site is the site collection root site, i.e. http://spserver/sites/site1
. Please help, thanks.