While handling business requirements in event receivers,
we often need to handle common scenarios with before and after properties.
The behavior of these properties is different for
a list and a library. Below is a summary of the behavior.
List:
List
|
BeforeProperties
|
AfterProperties
|
properties.ListItem
|
ItemAdding
|
No value
|
New value
|
Null
|
ItemAdded
|
No value
|
New value
|
New value
|
ItemUpdating
|
No value
|
Changed value
|
Original value
|
ItemUpdated
|
No value
|
Changed value
|
Changed value
|
ItemDeleting
|
No value
|
No value
|
Original value
|
ItemDeleted
|
No value
|
No value
|
Null
|
Library:
Library
|
BeforeProperties
|
AfterProperties
|
properties.ListItem
|
ItemAdding
|
No value
|
No value
|
Null
|
ItemAdded
|
No value
|
No value
|
New value
|
ItemUpdating
|
Original value
|
Changed value
|
Original value
|
ItemUpdated
|
Original value
|
Changed value
|
Changed value
|
ItemDeleting
|
No value
|
No value
|
Original value
|
ItemDeleted
|
No value
|
No value
|
Null
|