Steps for Creating Item Event Handlers
- Open VS 2005 -> Select a class Library project -> Name it ____Handlers.
- Inherit the class from SPItemEventReceiver.
- override ItemAdded, ItemUpdated (Asynchronous Events)
Item Adding, ItemUpdating (Synchronous Events) - Install the DLL in GAC
- There are Two ways to register an Event Handler a. Install Features b. Through code
- To Register through code -> Open new console project
Open site -> web -> get the list through code use the following method to register - List.EventReceivers.Add(, , );
No comments:
Post a Comment