Click to Rate and Give Feedback

  Switch on low bandwidth view
Community Content
In this section
Statistics Annotations (0)
SPWebEventReceiver Class (Microsoft.SharePoint)
Provides methods for trapping events that occur to Web sites. This class is never instantiated.

Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
Visual Basic (Declaration)
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel:=True)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel:=True)> _
Public Class SPWebEventReceiver
    Inherits SPEventReceiverBase
Visual Basic (Usage)
Dim instance As SPWebEventReceiver
C#
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel=true)] 
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel=true)] 
public class SPWebEventReceiver : SPEventReceiverBase

The SPWebEventReceiver class is not instantiated, but the Web site event receiver class of a custom event handler must derive from this class and override its methods for the event types that are handled.

This class provides a way to register and trap general events for a Web site.

System.Object
   Microsoft.SharePoint.SPEventReceiverBase
    Microsoft.SharePoint.SPWebEventReceiver
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
How to trap addition or removal of lists?      geovar   |   Edit   |   Show History

I am curious about the last remark: "This class provides a way to register and trap general events for a Web site, including the addition or removal of lists."

There is no such method in SPWebEventReceiver or in any of other event receiver classes. There is no sample, too.

Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker