O'Reilly logo

ASP.NET by Example by Steven A. Smith

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Handling Control Events

All custom controls inherit from the System.Web.UI.Control class, which defines the events described in Table 12.1.

Table 12.1. System.Web.UI.Control Events
Event Method To Override Description
DataBinding OnDataBinding(EventArgs e) Occurs when the server control binds to a data source.
Dispose Dispose() Occurs when a server control is released from memory, after the Unload() event.
Init OnInit(EventArgs e) Occurs when the server control is initialized.
Load OnLoad(EventArgs e) Occurs when the server control is loaded into the Page object.
PreRender OnPreRender(EventArgs e) Occurs when the server control is about to render to its containing Page object.
Unload OnUnload(EventArgs e) Occurs when the server control is unloaded ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required