Wednesday, April 23, 2008

Steps for Creating Item Event Handlers

  1. Open VS 2005 -> Select a class Library project -> Name it ____Handlers.
  2. Inherit the class from SPItemEventReceiver.
  3. override ItemAdded, ItemUpdated (Asynchronous Events)
    Item Adding, ItemUpdating (Synchronous Events)
  4. Install the DLL in GAC
  5. There are Two ways to register an Event Handler a. Install Features b. Through code
  6. To Register through code -> Open new console project
    Open site -> web -> get the list through code use the following method to register
  7. List.EventReceivers.Add(, , );

No comments: