次の方法で共有


SPWebEventReceiver Class

Provides methods for trapping events that occur to Web sites. This class is never instantiated.

Inheritance Hierarchy

System.Object
  Microsoft.SharePoint.SPEventReceiverBase
    Microsoft.SharePoint.SPWebEventReceiver

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
Public Class SPWebEventReceiver _
    Inherits SPEventReceiverBase

Dim instance As SPWebEventReceiver
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
public class SPWebEventReceiver : SPEventReceiverBase

Remarks

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.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

SPWebEventReceiver Members

Microsoft.SharePoint Namespace