Unload Event
Collapse the table of content
Expand the table of content

Control.Unload Event

Occurs when the server control is unloaded from memory.

[Visual Basic]
Public Event Unload As EventHandler
public event EventHandler Unload;
public: __event EventHandler* Unload;

[JScript] In JScript, you can handle the events defined by a class, but you cannot define your own.

Event Data

The event handler receives an argument of type EventArgs.


Server controls must perform any final clean-up, such as closing files, database connections and discarding objects, during this stage of the control lifecycle before the instance is unloaded.


Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

Control Class | Control Members | System.Web.UI Namespace | Page | Control Execution Lifecycle | Web Forms Page Processing

© 2015 Microsoft