Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Handles the synchronous event that occurs before an item is added.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
'Declaration
Public Overridable Sub ItemAdding ( _
properties As SPItemEventProperties _
)
'Usage
Dim instance As SPItemEventReceiver
Dim properties As SPItemEventProperties
instance.ItemAdding(properties)
public virtual void ItemAdding(
SPItemEventProperties properties
)
properties
Type: Microsoft.SharePoint.SPItemEventPropertiesThe properties of the event handler.
Exception | Condition |
---|---|
ArgumentNullException | properties is null . |
This event occurs in the following situations:
Default data is populated from a template.
New items are created using the browser user interface.
New items are added using the object model or Web service.
Warning
When adding a new document to a document library, do not use the property setting Status=CancelNoError to cancel this event, since doing so redirects the user to the "File not found" error.