3.5 Page and Control Events
The
page and controls all have a number of
events that are derived from the Control class (or the
TemplateControl class, in the case of the
Error event). All pass an event argument of type EventArgs that
exposes no properties. Some of these events are listed in Table 3-2.
Table 3-2. Some common page and control events|
DataBinding
|
Occurs when control binds to a data source
|
Disposed
|
Occurs when control is released from memory
|
Error
|
For the page only, occurs when an unhandled exception is thrown
|
Init
|
Occurs when the control is initialized
|
Load
|
Occurs when the control is loaded to the Page object
|
PreRender
|
Occurs when the control is about to be rendered
|
Unload
|
Occurs when the control is unloaded from memory
|
|
Binding a
control
to a data source means that the
control and the data source are tied together so that the control
knows to use that data source for populating itself. Chapter 9 provides a complete description of controls
and data binding.
|
|
|