EXAMPLE : Override the event as given below in your code-behind cs file of your aspx page

protected  void Page_Load(object sender, EventArgs e)

{//  The  Page calls the  OnLoad event method on the  Page, then recursively does the  same for each child control, which does the same for each of its child controls  until the page and all controls are loaded.
//  Use the OnLoad event method to set properties in controls and establish database  connections.
}

(6)Control (PostBack) event(s)ASP.NET now calls any events on the page or its controls that caused the PostBack to occur. This might be a button’s click event or a dropdown’s selectedindexchange event, for example.These are the events, the code for which is written in your code-behind class(.cs file).

EXAMPLE : Override the event as given below in your code-behind cs file of your aspx page

protected  void Button1_Click(object  sender, EventArgs e)

{//  This is just  an example of control event.. Here it is button click event that caused the  postback
}

(7)LoadComplete This event signals the end of Load.

EXAMPLE : Override the event as given below in your code-behind cs file of your aspx page

protected  void Page_LoadComplete(object sender, EventArgs e)

{//  Use this event for tasks that require that all other controls on the page be  loaded.
}

Similar Topics:

Tags:

asp net page life cycle events with exampleasp net page life cycle with examplepage life cycle in asp net with exampleasp net page life cycle in detailasp net life cycle in detailasp net page life cycle examplepagelife cycle in asp net with examplepage life cycle in asp netasp net page life cycle with examplespage life cycle events in asp net with examples