1.

Explain ASP.NET page life cycle events.

Answer»
  • PreInit: This event is raised after the start stage is complete and before the initialization stage.
  • Init: This event occurs after all controls have been initialized. We can use this event to read or initialize control properties.
  • InitComplete: This event occurs at the END of the page's initialization stage. We can use this event to make changes to view state that we want to make sure are persisted after the next postback.
  • PreLoad: This event occurs before the postback data is loaded in the controls.
  • Load: This event is raised for the page first time and then recursively for all child controls.
  • Control events: This event is used to HANDLE specific control events such as Button control' CLICK event.
  • LoadComplete: This event occurs at the end of the event-handling stage. We can use this event for tasks that require all other controls on the page be loaded.
  • PreRender: This event occurs after the page OBJECT has created all controls that are required in order to render the page.
  • PreRenderComplete: This event occurs after each data bound control whose DataSourceID property is set calls its DataBind method.
  • SaveStateComplete: It is raised after view state and control state have been saved for the page and for all controls.
  • Render: This is not an event; INSTEAD, at this stage of processing, the Page object calls this method on each control.
  • Unload: This event raised for each control and then for the page.


Discussion

No Comment Found