What is ASP.NET Page Life Cycle?
When ASP.NET Web Page Run takes place over a life
cycle Passes, in which it performs a series of several processing steps. This Initialization
of Web Page occurs under Series, if on Web Page If there is a control, then
initialization of those controls happens, the state Restore and Maintain is
done, Event Handler Codes are run and the generated response is rendered by Web
Browser.
Therefore,
understanding the life cycle of a page is especially useful for us when we Developing
custom controls for our web page. Because in that case the Controls Correctly
Initialize, View-State Populate Control Properties with Data and Perform tasks
like running Behavior of Control in Appropriate Stage of Page Life Cycle It is
necessary to do.
Generally, the life
cycle of our custom control is also based on the life cycle of our web page, so
The Life-Cycle of the Control is controlled on the basis of the Life-Cycle of
the page.
Page Request Stage -
Before the life-cycle of a page starts, Page Request is
performed by a user represents a request for a Web Page. ASP.NET during
this stage The web server detects that the web page for which the user
performed the request Is, you will have to compile by parse that web
page or someone from that web page already Cached Version is Exist, which can
be used to generate Response Generate.
Page Start Stage –
In this stage of the Life-Cycle of a Web Page, Properties
like Request a Response of Page Is set Also in this stage, it is also
ascertained that the page for which The request is made, that request is a
PostBack Request or a New Request and this is the ISPostBack Property is
checked for detection. Also Page Your UICulture Property is also set in this
stage.
Page Initialization Stage –
Initialization of the page occurs during this stage of the asp .net life cycle of a page during which the page Various Controls Located Initialization
takes place and their Unique Property is set. Also, if the Master Page or a theme is specified, the life-cycle of the Web Page During this stage of that,
they also apply Master Page or theme while Current Request One If there is a PostBack request.
The PostBack data
would not have been loaded yet. Also Control Property Values are also not restored
from their view-State values.
Page Load Stage –
This Stage of the Life-Cycle of a Page contains Page Load.
Whereas if Current Request is an If PostBack Request, then Control Property
Values is the same Stage from the Values of your View state. Contains Restore.
Page Postback Event Handling Stage-
If the current request is a PostBack request then the Event
Handlers of the Control are given a page. This stage of the asp .net life cycle consists
of calls, after which Validate () of all Validator Controls Methods are calls
that set the IsValid Property of all the individual controls on a page.
Page Rendering Stage-
Before rendering in this stage of the life-cycle of a page,
the current page and all its View-state is saving for Controls. Page for every
control during this stage The Render () calls the method and provides a
Text Writer which will change its output Write in the Output-stream object of
the Response Property of our page.
Page Unload Stage-
In this stage of the asp .net life cycle of a page, our page is
completely rendered; to the client Send has been done and is ready to be
Destroy. Page's Response in this Stage Properties like Request and Unload are
cleaned up i.e. by Dot NET Platform Garbage Collection is Procedure executed.
Thus an ASP.NET Web Page in your Life Cycle with many
stages Passes and performs an Event Trigger at the end of each stage, which represents
the end of the stage. Stay connected with TechMaster for more information.
0 Comments
Please do not enter any spam link in the comment box.