Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

how can I add an event receiver to the style library ? (can't find any templateid)

thank you ;)

share|improve this question

migrated from stackoverflow.com Dec 17 '11 at 16:37

This question came from our site for professional and enthusiast programmers.

2  
It has the same id as document library - 101 –  Nitin Rastogi Dec 13 '11 at 13:18
    
how to differentiate them for the event receiver ?? –  user1014732 Dec 13 '11 at 13:18
3  
See this for more details. Since you only want to attach to Styles Library, you will have to attach using code - social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/… –  Nitin Rastogi Dec 13 '11 at 13:21
add comment

2 Answers 2

A style library uses the document library template (101), so that is the ID you use to create an event receiver.

The following link provides a detailed list of template ID's for registration: http://techtrainingnotes.blogspot.com/2008/01/sharepoint-registrationid-list-template.html

share|improve this answer
add comment

On Elements.xml, use ListUrl instead of ListTemplateId

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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