Close

What is page life cycle of asp.net?tririd.com

When a page is requested, it is loaded into the server memory, processed, and sent to the browser. Then it is unloaded from the memory. At each of these steps, methods and events are available, which could be overridden
according to the need of the application.

Page Cycle:

When The page is requested it goes through the following life cycle :

  • Initialization
  • Instantiation of the controls on the page
  • Restoration and maintenance of the state
  • Execution of the event handler codes
  • Page rendering

1. Page Request:

This is when the page is first requested from the server. When the page is requested, the server checks if it is requested for the first time.

2. Page Start:

During this time, 2 objects, known as the Request and Response object are created. The Request object is used to hold all the information which was sent when the page was requested.

3. Page Initialization – During this time, all the controls on a web page is initialized. So if you have any label, textbox or any other controls on the web form, they are all initialized.

4. Page Load – This is when the page is actually loaded with all the default values.

5. Validation – Sometimes there can be some validation set on the form. For example, there can be a validation which says that a list box should have a certain set of values. If the condition is false, then there should be an error in loading the page.

6. Postback event handling – This event is triggered if the same page is being loaded again. This happens in response to an earlier event. Sometimes there can be a situation that a user clicks on a submit button on the page.

7. Page Rendering – This happens just before all the response information is sent to the user.

8. Unload – Once the page output is sent to the user, there is no need to keep the ASPNET web form objects in memory.

Tririd Technologies Pvt Ltd is Gujarat Based Software Company which provides Web Application DevelopmentMobile Application DevelopmentSearch Engine Optimization, Word pressCustom Software, Database management etc

To develop Application in .Net Technology

call us @ +91 8980010210

Visit us @ http://www.tririd.com

Leave a Reply

Your email address will not be published. Required fields are marked *