Control.Dispose Method ()
.NET Framework (current version)
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 Dispose method to close the HtmlTextWriter object associated with a control, and call the Dispose method on a Button control, named myButton. If an Exception is thrown when this version of the Dispose method is called, the control writes a message to the current HttpResponse object.
.NET Framework
Available since 1.1
Available since 1.1
Show: