BRIEF EXPLANATION OF ASP. LIFECYCLE OF APPLICATIONS IN NET

ASP. LIFECYCLE OF APPLICATIONS IN NET

When the ASP.Net application is launched, a series of steps are executed. This series of steps forms the lifecycle of the application. Let us understand the various steps of a specific life cycle of ASP.Net Web Application.


BRIEF EXPLANATION OF ASP. LIFECYCLE OF APPLICATIONS IN NET


1. Application Start -


The life cycle of an ASP.NET application starts when a user requests it. This request is for the ASP.Net application from the webserver. This happens when the first user normally visits the home page for the first time. During this time there is a method called application_start which is executed by the webserver.

2. Object creation -


The next step is to create HttpContext, HttpRequest & HttpResponse by the webserver. HttpContext is the container for HttpRequest and HttpResponse objects only. The HttpRequest object contains information about the current request, which contains information about cookies and browsers. The HttpResponse object contains the response sent to the client.


3. HTTP Application creation -


This object is created by the webserver. This is the object that is used to process each subsequent request sent to the application. For example, suppose we have 2 web applications. One is a shopping cart application, and the other is a news website. For each application, 2 HttpApplication objects will be created by us. Any request on each website will be progressively processed by each HttpApplication.


4. Dispose of -


This event is called before the application instance is destroyed. In the meantime, you can use this method to manually release any unmanaged resources.


5. Application End -


This is the final part of the application. In this part, the application is unloaded from memory.


What is the ASP.Net page lifecycle?



BRIEF EXPLANATION OF ASP. LIFECYCLE OF APPLICATIONS IN NET


When the ASP.Net page is called, it goes through a special lifecycle. This process is performed before the response is sent to the user. It is a series of steps that are followed for processing the ASP.Net page. Understand the various steps in the lifecycle of the ASP.Net web page.


Page Request


This happens when the page is requested from the server for the first time. When the page is requested, the server checks if it is requested for the first time. If so, it needs to compile the page, parse the response and send it to the user. If this is not the first time the page has been requested, the cache is checked to see if the page's output is present. If it is, that response is sent to the user.


Page Start


During this time, the Request and Response objects are created. Request objects are used to hold all the information that was sent at the time of the page's request. The Response object is used to hold information that is sent back to the user.


Page Initialization


During this time, all controls are initialized on a web page. So if you have a label, textbox, or any other controls on the web form, all of them are initialized.


Page Load


This happens when the page is actually filled with default values. If a textbox has a default value, the same value is loaded when the page is loaded.


Validation


Sometimes validation can be set on the form. For example, validation could be such that values ​​should be set in a list box. If the condition is false, then there should be an error in loading the page.


Postback event handling


This event starts if the page is reloaded. Sometimes there may be a situation that if the user clicks on submit button on the page then in that case, the same page is displayed again. In such a case, the Postback event handler is called.


Page Rendering


This response occurs immediately before the information is sent to the user. All the information on the form is saved, and the result is sent to the user in the form of a complete web page.


Unload


After the page's output is sent to the user, there is no need to place the ASP.net web form object in memory. So the unloading process involves removing all unwanted objects from memory.

AKASH TIMES

I AM AN ENGINEER BY PROFESSION BUT BLOGGER IS MY OLD DAYS DREAM TO CREATE MY OWN SITE FOR THOSE WHO ARE CURIOUS ABOUT MY BIRTHPLACE THEN I AM COMING FROM (INDIA). THE CURRENT CITY LIVES IN NAVI MUMBAI, INDIA

Post a Comment

IF YOU HAVE ANY PROBLEM PLEASE FELL FREE TO CONTACT US BY - AKASH TIMES

PREVIOUS POST NEXT POST