Enables a server control to perform final clean up before it is released from memory.
Assembly: System.Web (in System.Web.dll)
The following code example overrides the method to close the HtmlTextWriter object associated with a control, and call the method on a Button control, named myButton. If an Exception is thrown when this version of the method is called, the control writes a message to the current HttpResponse object.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2