When you define a content type with a feature, you create 2 XML files as shown below:
- Feature.xml – Use this XML file to define the metadata for the new feature. The ElementManifests element points to the location of the 2nd XML file storing all of the detailed information on the feature itself.
- Elements.xml – Use this file to define the assembly that encapsulates the event handler, the class itself, and also a sequence number that specifies the order.
Note: Event receivers in content types are defined in a different section of the elements file. The Receiver XmlDocument resides in the http://schemas.microsoft.com/sharepoint/events namespace.
Related post: Writing Event Receiver Class in Code
References:
http://download.microsoft.com/download/b/d/4/bd45c0a8-74bc-4e3a-9735-a715b902f89c/03-EventHandlers.docx
No comments:
Post a Comment