Enables derived classes to provide custom handling when a WebPart control is permanently removed from a Web Parts page.
protected internal virtual void OnDeleting(
The method in the WebPart base class contains no implementation.Notes to Inheritors
A derived control needs to override the OnDeleting method. Developers can raise custom events or carry out other actions. The method is called when the DeleteWebPart method is called.
Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0