Itemupdating change value
Instead of writing more paragraphs I can use tabular to explain, I think this will be easy to understand.Each event method has a SPItem Event Properties parameter named properties.I should also point out that I know the difference between a metaphor and simile in case that was bothering you from the opening sentence.I am nothing if not a masterful linguist after a beer or two or more.If the name isn’t changed, the changes are saved to the Share Point list.Before you can deploy the event receiver you have to change the file to bind the Update Adding event receiver to all custom lists.Although asynchronous events expose a SPItem Event Properties parameter named properties just like their synchronous counterparts, remember that the operation has already completed so you cannot modify anything in the properties parameter (well, you can, but it doesn’t do anything).Additionally, the properties parameter may not be populated with information that you would tend to expect to be present.
We may never know about all of the dangers lurking out there, but today we’re going to cover at least one danger you may encounter while writing event receivers – an annoying issue with the Item Updating and Item Updated events firing twice.
Users can change data like the number of moons or the distance to the earth, but they are not able to change the name of the planet.
To prevent users from changing the name of the planet, you can develop a Item Updating event receiver.
The changed values can be retrieved from the After Properties of the incoming properties argument.
You could think that the current values are stored in the Before Properties of the item but that’s not true: the Before Properties are unreliable at this point. When the name of the planet is changed, the update is canceled and an error message is returned to the user.