<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://logicwiki.co.uk/index.php?action=history&amp;feed=atom&amp;title=ASP.NET_Page_Life_Cycle_Overview</id>
		<title>ASP.NET Page Life Cycle Overview - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://logicwiki.co.uk/index.php?action=history&amp;feed=atom&amp;title=ASP.NET_Page_Life_Cycle_Overview"/>
		<link rel="alternate" type="text/html" href="https://logicwiki.co.uk/index.php?title=ASP.NET_Page_Life_Cycle_Overview&amp;action=history"/>
		<updated>2026-04-29T09:49:37Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>https://logicwiki.co.uk/index.php?title=ASP.NET_Page_Life_Cycle_Overview&amp;diff=255&amp;oldid=prev</id>
		<title>Dt1nh6: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://logicwiki.co.uk/index.php?title=ASP.NET_Page_Life_Cycle_Overview&amp;diff=255&amp;oldid=prev"/>
				<updated>2016-05-09T13:27:28Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 13:27, 9 May 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan='2' style='text-align: center;' lang='en'&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Dt1nh6</name></author>	</entry>

	<entry>
		<id>https://logicwiki.co.uk/index.php?title=ASP.NET_Page_Life_Cycle_Overview&amp;diff=254&amp;oldid=prev</id>
		<title>Macrop at 10:30, 31 March 2015</title>
		<link rel="alternate" type="text/html" href="https://logicwiki.co.uk/index.php?title=ASP.NET_Page_Life_Cycle_Overview&amp;diff=254&amp;oldid=prev"/>
				<updated>2015-03-31T10:30:35Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:ASP.NET]]&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
When an ASP.NET page runs, the page goes through a life cycle in which it performs a series of processing steps. These include initialization, instantiating controls, restoring and maintaining state, running event handler code, and rendering. It is important for you to understand the page life cycle so that you can write code at the appropriate life-cycle stage for the effect you intend.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you develop custom controls, you must be familiar with the page life cycle in order to correctly initialize controls, populate control properties with view-state data, and run control behavior code. The life cycle of a control is based on the page life cycle, and the page raises many of the events that you need to handle in a custom control.&lt;br /&gt;
&lt;br /&gt;
== General Page Life-Cycle Stages ==&lt;br /&gt;
&lt;br /&gt;
In general terms, the page goes through the stages outlined in the following table. In addition to the page life-cycle stages, there are application stages that occur before and after a request but are not specific to a page. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some parts of the life cycle occur only when a page is processed as a postback. For postbacks, the page life cycle is the same during a partial-page postback (as when you use an UpdatePanel control) as it is during a full-page postback.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&lt;br /&gt;
Stage&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
!&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Page request&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
The page request occurs before the page life cycle begins. When the page is requested by a user, ASP.NET determines whether the page needs to be parsed and compiled (therefore beginning the life of a page), or whether a cached version of the page can be sent in response without running the page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Start&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
In the start stage, page properties such as [[Request]] and [[Response]] are set. At this stage, the page also determines whether the request is a postback or a new request and sets the [[IsPostBack]] property. The page also sets the [[UICulture]] property.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Initialization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
During page initialization, controls on the page are available and each control's [[UniqueID]] property is set. A master page and themes are also applied to the page if applicable. If the current request is a postback, the postback data has not yet been loaded and control property values have not been restored to the values from view state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Load&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
During load, if the current request is a postback, control properties are loaded with information recovered from view state and control state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Postback event handling&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
If the request is a postback, control event handlers are called. After that, the [[Validate]] method of all validator controls is called, which sets the [[IsValid]] property of individual validator controls and of the page. (There is an exception to this sequence: the handler for the event that caused validation is called after validation.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Rendering&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Before rendering, view state is saved for the page and all controls. During the rendering stage, the page calls the [[Render]] method for each control, providing a text writer that writes its output to the [[OutputStream]] object of the page's [[Response]] property.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Unload&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
The [[Unload]] event is raised after the page has been fully rendered, sent to the client, and is ready to be discarded. At this point, page properties such as [[Response]] and [[Request]] are unloaded and cleanup is performed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
== Life-Cycle Events ==&lt;br /&gt;
&lt;br /&gt;
Within each stage of the life cycle of a page, the page raises events that you can handle to run your own code. For control events, you bind the event handler to the event, either declaratively using attributes such as onclick, or in code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Pages also support automatic event wire-up, meaning that ASP.NET looks for methods with particular names and automatically runs those methods when certain events are raised. If the AutoEventWireup attribute of the [[@ Page]] directive is set to true, page events are automatically bound to methods that use the naming convention of Page_event, such as Page_Load and Page_Init. For more information on automatic event wire-up, see [[ASP.NET Web Server Control Event Model]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table lists the page life-cycle events that you will use most frequently. There are more events than those listed; however, they are not used for most page-processing scenarios. Instead, they are primarily used by server controls on the ASP.NET Web page to initialize and render themselves. If you want to write custom ASP.NET server controls, you need to understand more about these events. For information about creating custom controls, see [[Developing Custom ASP.NET Server Controls]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&lt;br /&gt;
Page Event&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
!&lt;br /&gt;
Typical Use&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[PreInit]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Raised after the start stage is complete and before the initialization stage begins.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use this event for the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Check the [[IsPostBack]] property to determine whether this is the first time the page is being processed. The [[IsCallback]] and [[IsCrossPagePostBack]] properties have also been set at this time.&lt;br /&gt;
* Create or re-create dynamic controls.&lt;br /&gt;
* Set a master page dynamically.&lt;br /&gt;
* Set the [[Theme]] property dynamically.&lt;br /&gt;
* Read or set profile property values.  [[Image:clear.gif|Note]]'''Note:'''If the request is a postback, the values of the controls have not yet been restored from view state. If you set a control property at this stage, its value might be overwritten in the next event.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[Init]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Raised after all controls have been initialized and any skin settings have been applied. The [[Init]] event of individual controls occurs before the [[Init]] event of the page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use this event to read or initialize control properties.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[InitComplete]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Raised at the end of the page's initialization stage. Only one operation takes place between the [[Init]] and [[InitComplete]] events: tracking of view state changes is turned on. View state tracking enables controls to persist any values that are programmatically added to the [[ViewState]] collection. Until view state tracking is turned on, any values added to view state are lost across postbacks. Controls typically turn on view state tracking immediately after they raise their [[Init]] event.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use this event to make changes to view state that you want to make sure are persisted after the next postback.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[PreLoad]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Raised after the page loads view state for itself and all controls, and after it processes postback data that is included with the [[Request]] instance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[Load]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
The [[Page]] object calls the [[OnLoad]] method on the [[Page]] object, and then recursively does the same for each child control until the page and all controls are loaded. The [[Load]] event of individual controls occurs after the [[Load]] event of the page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the [[OnLoad]] event method to set properties in controls and to establish database connections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Control events&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Use these events to handle specific control events, such as a [[Button]] control's [[Click]] event or a [[TextBox]] control's [[TextChanged]] event.&lt;br /&gt;
&lt;br /&gt;
[[Image:clear.gif|Note]]'''Note:'''In a postback request, if the page contains validator controls, check the [[IsValid]] property of the [[Page]] and of individual validation controls before performing any processing.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[LoadComplete]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Raised at the end of the event-handling stage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use this event for tasks that require that all other controls on the page be loaded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[PreRender]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Raised after the [[Page]] object has created all controls that are required in order to render the page, including child controls of composite controls. (To do this, the [[Page]] object calls [[EnsureChildControls]] for each control and for the page.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The [[Page]] object raises the [[PreRender]] event on the [[Page]] object, and then recursively does the same for each child control. The [[PreRender]] event of individual controls occurs after the [[PreRender]] event of the page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the event to make final changes to the contents of the page or its controls before the rendering stage begins.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[PreRenderComplete]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Raised after each data bound control whose [[DataSourceID]] property is set calls its [[DataBind]] method. For more information, see [[Data Binding Events for Data-Bound Controls]] later in this topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[SaveStateComplete]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Raised after view state and control state have been saved for the page and for all controls. Any changes to the page or controls at this point affect rendering, but the changes will not be retrieved on the next postback.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[Render]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
This is not an event; instead, at this stage of processing, the [[Page]] object calls this method on each control. All ASP.NET Web server controls have a [[Render]] method that writes out the control's markup to send to the browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you create a custom control, you typically override this method to output the control's markup. However, if your custom control incorporates only standard ASP.NET Web server controls and no custom markup, you do not need to override the [[Render]] method. For more information, see [[Developing Custom ASP.NET Server Controls]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A user control (an .ascx file) automatically incorporates rendering, so you do not need to explicitly render the control in code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[Unload]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Raised for each control and then for the page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In controls, use this event to do final cleanup for specific controls, such as closing control-specific database connections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the page itself, use this event to do final cleanup work, such as closing open files and database connections, or finishing up logging or other request-specific tasks.&lt;br /&gt;
&lt;br /&gt;
[[Image:clear.gif|Note]]'''Note:'''During the unload stage, the page and its controls have been rendered, so you cannot make further changes to the response stream. If you attempt to call a method such as the Response.Write method, the page will throw an exception.&lt;br /&gt;
|}&lt;br /&gt;
== Additional Page Life Cycle Considerations ==&lt;br /&gt;
&lt;br /&gt;
Individual ASP.NET server controls have their own life cycle that is similar to the page life cycle. For example, a control's [[Init]] and [[Load]] events occur during the corresponding page events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Although both [[Init]] and [[Load]] recursively occur on each control, they happen in reverse order. The [[Init]] event (and also the [[Unload]] event) for each child control occur before the corresponding event is raised for its container (bottom-up). However the [[Load]] event for a container occurs before the [[Load]] events for its child controls (top-down). Master pages behave like child controls on a page: the master page [[Init]] event occurs before the page [[Init]] and [[Load]] events, and the master page [[Load]] event occurs after the page [[Init]] and [[Load]] events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When you create a class that inherits from the [[Page]] class, in addition to handling events raised by the page, you can override methods from the page's base class. For example, you can override the page's [[InitializeCulture]] method to dynamically set culture information. Note that when an event handler is created using the Page_event syntax, the base implementation is implicitly called and therefore you do not need to call it in your method. For example, the base page class's [[OnLoad]] method is always called, whether you create a Page_Load method or not. However, if you override the page [[OnLoad]] method with the override keyword (Overrides in Visual Basic), you must explicitly call the base method. For example, if you override the [[OnLoad]] method on the page, you must call base.Load (MyBase.Load in Visual Basic) in order for the base implementation to be run.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For an illustration that shows some of the most important methods of the [[Page]] class that you can override in order to add code that executes at specific points in the page life cycle, see the [[.NET Framework 4 version of this document]]. (For a complete list of page methods and events, see the [[Page]] class.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Catch-Up Events for Added Controls ==&lt;br /&gt;
&lt;br /&gt;
If controls are created dynamically at run time or declaratively within templates of data-bound controls, their events are initially not synchronized with those of other controls on the page. For example, for a control that is added at run time, the [[Init]] and [[Load]] events might occur much later in the page life cycle than the same events for controls created declaratively. Therefore, from the time that they are instantiated, dynamically added controls and controls in templates raise their events one after the other until they have caught up to the event during which it was added to the [[Controls]] collection.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Data Binding Events for Data-Bound Controls ==&lt;br /&gt;
&lt;br /&gt;
To help you understand the relationship between the page life cycle and data binding events, the following table lists data-related events in data-bound controls such as the [[GridView]], [[DetailsView]], and [[FormView]] controls.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&lt;br /&gt;
Control Event&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
!&lt;br /&gt;
Typical Use&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[DataBinding]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Raised after the control's [[PreRender]] event, which occurs after the page's [[PreRender]] event. (This applies to controls whose [[DataSourceID]] property is set declaratively. Otherwise the event happens when you call the control's DataBind method.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This event marks the beginning of the process that binds the control to the data. Use this event to manually open database connections, if required, and to set parameter values dynamically before a query is run.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[RowCreated]] ([[GridView]] only) or [[ItemCreated]] ([[DataList]], [[DetailsView]], [[SiteMapPath]], [[DataGrid]], [[FormView]], [[Repeater]], and [[ListView]] controls)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Raised after the control's [[DataBinding]] event.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use this event to manipulate content that is not dependent on data binding. For example, at run time, you might programmatically add formatting to a header or footer row in a [[GridView]] control.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[RowDataBound]] ([[GridView]] only) or [[ItemDataBound]] ([[DataList]], [[SiteMapPath]], [[DataGrid]], [[Repeater]], and [[ListView]] controls)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Raised after the control's [[RowCreated]] or [[ItemCreated]] event.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When this event occurs, data is available in the row or item, so you can format data or set the [[FilterExpression]] property on child data source controls in order to display related data within the row or item.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[DataBound]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Raised at the end of data-binding operations in a data-bound control. In a [[GridView]] control, data binding is complete for all rows and any child controls.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use this event to format data-bound content or to initiate data binding in other controls that depend on values from the current control's content. (For more information, see [[Catch-Up Events for Added Controls]] earlier in this topic.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
=== Nested Data-Bound Controls ===&lt;br /&gt;
&lt;br /&gt;
If a child control has been data bound, but its container control has not yet been data bound, the data in the child control and the data in its container control can be out of sync. This is true particularly if the data in the child control performs processing based on a data-bound value in the container control.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, suppose you have a [[GridView]] control that displays a company record in each row, and it displays a list of the company officers in a [[ListBox]] control. To fill the list of officers, you would bind the [[ListBox]] control to a data source control (such as [[SqlDataSource]]) that retrieves the company officer data using the company ID in a query.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the [[ListBox]] control's data-binding properties, such as [[DataSourceID]] and [[DataMember]], are set declaratively, the [[ListBox]] control will try to bind to its data source during the containing row's [[DataBinding]] event. However, the CompanyID field of the row does not contain a value until the [[GridView]] control's [[RowDataBound]] event occurs. In this case, the child control (the [[ListBox]] control) is bound before the containing control (the [[GridView]] control) is bound, so their data-binding stages are out of sync.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To avoid this condition, put the data source control for the [[ListBox]] control in the same template item as the [[ListBox]] control itself, and do not set the data binding properties of the [[ListBox]] declaratively. Instead, set them programmatically at run time during the [[RowDataBound]] event, so that the [[ListBox]] control does not bind to its data until the CompanyID information is available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more information, see [[Binding to Data Using a Data Source Control]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Login Control Events ==&lt;br /&gt;
&lt;br /&gt;
The [[Login]] control can use settings in the Web.config file to manage membership authentication automatically. However, if your application requires you to customize how the control works, or if you want to understand how [[Login]] control events relate to the page life cycle, you can use the events listed in the following table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&lt;br /&gt;
Control Event&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
!&lt;br /&gt;
Typical Use&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[LoggingIn]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Raised during a postback, after the page's [[LoadComplete]] event has occurred. This event marks the beginning of the login process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use this event for tasks that must occur prior to beginning the authentication process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[Authenticate]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Raised after the [[LoggingIn]] event.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use this event to override or enhance the default authentication behavior of a [[Login]] control.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[LoggedIn]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Raised after the user name and password have been authenticated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use this event to redirect to another page or to dynamically set the text in the control. This event does not occur if there is an error or if authentication fails.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[LoginError]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Raised if authentication was not successful.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use this event to set text in the control that explains the problem or to direct the user to a different page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Macrop</name></author>	</entry>

	</feed>