Unloading Initialization During this stage the IsPostback property is set. The page determines whether the request is a Postback old request or if this is the first time the page is being processed new request. Controls on the page are available and each control's UniqueID property is set. Now if the current request is a postback then the data has not been loaded and the value of the controls have not yet been restored from the view state. Loading At this stage if the request is a Postback then it loads the data from the view state.
Rendering Before rendering, the View State is saved for the page and its controls. During this phase, the page calls the render method for each control, providing a text writer that writes its output to the OutputStream of the page's Response property. Unloading Unload is called after the page has been fully rendered, sent to the client and is ready to be discarded.
At this point also the page properties such as Response and Request are unloaded. For further info click on the link: What is the ASP. NET page life cycle events? We have many events in ASP. Page request When ASP. NET gets a page request, it decides whether to parse and compile the page or there would be a cached version of the page; accordingly the response is sent, Starting of page life cycle At this stage, the Request and Response objects are set.
If the request is an old request or post back, the IsPostBack property of the page is set to true. The UICulture property of the page is also set. Page initialization At this stage, the controls on the page are assigned unique ID by setting the UniqueID property and themes are applied. For a new request postback data is loaded and the control properties are restored to the view-state values.
Page load At this stage, control properties are set using the view state and control state values. Validation Validate method of the validation control is called and if it runs successfully, the IsValid property of the page is set to true. Postback event handling If the request is a postback old request , the related event handler is called. Page rendering At this stage, view state for the page and all controls are saved. The page calls the Render method for each control and the output of rendering is written to the OutputStream class of the Page's Response property.
Unload The rendered page is sent to the client and page properties, such as Response and Request are unloaded and all cleanup done. PreInit PreInit is the first event in page life cycle. It checks the IsPostBack property and determines whether the page is a postback. It sets the themes and master pages, creates dynamic controls and gets and sets profile property values. Init Init event initializes the control property and the control tree is built.
InitComplete InitComplete event allows tracking of view state. All the controls turn on view-state tracking. PreLoad PreLoad occurs before the post back data is loaded in the controls. Load The Load event is raised for the page first and then recursively for all child controls. The controls in the control tree are created.
LoadComplete The loading process is completed, control event handlers are run and page validation takes place. PreRender The PreRender event occurs just before the output is rendered. By handling this event, pages and controls can perform any updates before the output is rendered.
PreRenderComplete as the PreRender event is recursively fired for all child controls, this event ensures the completion of the pre-rendering phase.
SaveStateComplete State of control on the page is saved. Personalization, control state and view state information is saved. The HTML markup is generated. UnLoad The UnLoad phase is the last phase of the page life cycle. It raises the UnLoad event for all controls recursively and lastly for the page itself. Final cleanup is done and all resources and references, such as database connections, are freed.
Describe login Controls in ASP? The Login control provides the user interface to log a user into a web site. The Login control uses the Membership service to authenticate the user in your membership system. The default Membership service from your configuration file will be used automatically, however you can also set the Membership provider that you would like used as a property on the control.
The Login Control consists of: Username Label and Textbox: Collects the string used to identify the user in the membership system. Password Label and Textbox: Collects the password for the specified user.
The textbox text is always obscured. The button to submit the users request for authentication. Configurable to display a checkbox giving the user the option to store a persistent cookie on the user's machine. Text to orient and guide the user through the process.
Configurable links to help, password recovery and user registration information. Required field Validators for the username and password textboxes.