Server Control Overview
1. Types of server controls and system base classes developed by ASP. NET controls
Control, webcontrol, compositecontrol, databoundcontrol, hierarchicaldataboundcontrol, hierarchichicalperformancecontrol,
Listcontrol, basevalidator.
2. Control lifecycle,
The lifecycle of a server control is similar to that of a page, but different from that of a page. Because a page is a container, its lifecycle is finer, because the page generation process is actually a process of server controls, but there is no need to manage themes, template pages, and many other places. For example, in the init phase, the page is divided into the template page and topic in the preinit phase. oninit initializes the Server Control and sets the container for the control. The initcomplete enables the control to have view tracking capabilities.
- Initialization (oninit)
- Loadviewstate)
- Loadpostdata)
- Onload)
- Data Return Event Notification (raisepostdatachangedevent)
- Raisepostbackevent)
- Onprerender)
- Saveviewstate)
- Rendering (render)
- Unload (onUnload)
- Release (dispose)