How to enable document library event handlers for the newly created document libraries at the list definition level
The List definition files can be configured in such a way that the event handler configured automatically for the newly created document libraries. Here I provide the details of how to do it.
- Open the Site definition folder. If you use default Site definition, STS, then open the folder from the following location.
“C:\program files\common files\Microsoft Shared\web server extensions\60\template\1033\STS
Note: Modifying the default files is not supported by Microsoft. Microsoft recommends using custom Site Definition.
Open the List Definition folder. If you use default list definition for document library, then open the “DOCLIB” folder in the LISTS folder
Open the “SCHEMA.XML” file in notepad or visual studio
Modify the LIST node by adding the EventSingAssembly, EventSinkClass, and EventSinkData
<List xmlns:ows="Microsoft SharePoint" Name="CustomDocuments" Title="Custom Shared Documents" Direction="0" Url="Custom Shared Documents" BaseType="1" EventSinkAssembly="TestEventHandler, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=614ce6399d917f80" EventSinkClass="TestEventHandler.MyEventHandler" EventSinkData = "">
Note:Here I hardcoded the EventSinkAssembly for sample. Could you please change it according to your component.
- Restart IIS.
After configuring the details, if you create new document library based on the list definition, then the document library event handler will be automatically configured.
Comments
Anonymous
July 07, 2008
Work-from-home. The work at home institute. Data entry work from home.Anonymous
August 06, 2008
The comment has been removedAnonymous
March 10, 2009
PingBack from http://www.baby-parenting.com/baby/search_babynames.php?babyname=Koby&gender=Male&x=9&y=8Anonymous
June 09, 2009
PingBack from http://hairgrowthproducts.info/story.php?id=4539Anonymous
June 16, 2009
PingBack from http://workfromhomecareer.info/story.php?id=246