0

Event Receiver not firing when the list have a space within the name:

 <?xml version="1.0" encoding="utf-8"?>
        <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
          <Receivers ListUrl="Lists/Style Library">
            <Receiver>
              <Name>EventReceiverItemAdded</Name>
              <Type>ItemAdded</Type>
              <Assembly>$SharePoint.Project.AssemblyFullName$</Assembly>
              <Class>Corporate.MEEventReceiver.TRSEventReceiver</Class>
              <SequenceNumber>10000</SequenceNumber>
            </Receiver>
      </Receivers>
    </Elements>

i tried <Receivers ListUrl="Lists/Style%20Library"> and <Receivers ListUrl="Lists/Style&#032;Library"> , but still not working.

  • just use name as it is library, for lists u have to mention Lists/ListTitle – Praveen Pudi Apr 19 '17 at 7:39
1

You use "Style Library" as Display Name. It has white space in between.So by default SharePoint changes it to "Share%20Library" as External Name. We can use them with there Internal Names . For Internal Name SharePoint Converts there special character into Inernal Hex code. For white space you can use x0020 in Internal Name. You can use below link for reference.

Internal Names mapping for all characters

Style_x0020_Library
  • I tried it but it (Style_x0020_Library) is not working – jobin Aug 9 '15 at 6:28
1

Use ListUrl="Style Library" or ListUrl="Style%20Library".

<Receivers ListUrl="Style Library">
            <Receiver>
              <Name>EventReceiverItemAdded</Name>
              <Type>ItemAdded</Type>
              <Assembly>$SharePoint.Project.AssemblyFullName$</Assembly>
              <Class>Corporate.MEEventReceiver.TRSEventReceiver</Class>
              <SequenceNumber>10000</SequenceNumber>
            </Receiver>
</Receivers>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.