Itemupdating get

Itemupdating get

To cancel the update operationThe command argument

ItemUpdating vs ItemUpdated

To cancel the update operation, set the Cancel property to true. You can also read or modify the new values entered by the user by using the and properties. If you need to access the original non-key field values, use the OldValues property.

For more information

You can also read or modify the new values entered by the user by using the Keys and NewValues properties. Values i IsNot Nothing Then e. This helps to prevent script injection attacks. When the CommandArgument property of the Update button is set, use the CommandArgument property to determine the value of the command argument.

For more information about how to handle events, see Handling and Raising Events. The command argument value corresponds to the CommandArgument property of the Update button. To cancel the update operation, set the property to true.

The Keys property contains the key fields, while the NewValues property contains the non-key fields. When the CommandArgument property of the Update button is set, use the property to determine the value of the command argument. If you need to access the original non-key field values, use the property. This allows you to provide an event handler that performs a custom routine, such as canceling the update operation, whenever this event occurs. Examples The following example demonstrates how to use the ItemUpdating event to cancel an update operation.