SlideShare ist ein Scribd-Unternehmen logo
1 von 12
ASP.NET LIFE CYCLE
IN DEPTH
ASP.NET life cycle guides in a brief tutorial about how :
- ASP.NET forms pages to create dynamic yield
- ASP.NET accumulates the pages progressively
- The application and its pages are initiated and handled
The ASP.NET life cycle could be partitioned into two gatherings:
- Application Life Cycle
- Page Life Cycle
The application life cycle has the certain accompanying stages:
- Client makes a manual request for getting access to the source page. Program sends
this request to the web server.
ASP.NET life cycle guides in a brief tutorial about how :
- ASP.NET forms pages to create dynamic yield
- ASP.NET accumulates the pages progressively
- The application and its pages are initiated and handled
The ASP.NET life cycle could be partitioned into two gatherings:
- Application Life Cycle
- Page Life Cycle
The application life cycle has the certain accompanying stages:
- Client makes a manual request for getting access to the source page. Program sends
ASP.NET life cycle guides in a brief tutorial about how :
- ASP.NET forms pages to create dynamic yield
- ASP.NET accumulates the pages progressively
- The application and its pages are initiated and handled
The ASP.NET life cycle could be partitioned into two gatherings:
- Application Life Cycle
- Page Life Cycle
The application life cycle has the certain accompanying stages:
- Client makes a manual request for getting access to the source page. Program sends
this request to the web server.
- A common pipeline gets the main request and the accompanying situations take place:
- An object of the class ApplicationManager is made.
- An object of the class HostingEnvironment is made to give manual data with respect to
the assets.
- Top level things in the application are assembled.
- Reaction articles are made. The application protests, for example, HttpContext,
HttpRequest and HttpResponse are made and introduced.
- An occurrence of the HttpApplication article is made and doled out to the request.
- The request is handled by the HttpApplication class. Diverse occasions are raised by this
class for handling the request.
At the point when a page is requested for, it is executed into the server memory, handled,
and sent to the program. Later it is unloaded from the memory. In between at every stage,
techniques and events are accessible, which could be rejected or canceled by need of the
application. Rather, you can compose a manual particular code to reject the default code.
The Page class makes a tree arranged in order of ranks, of all the controls on the page. All
the elements of the page beside the directives, are a part of this control tree.
You can see the control tree by including trace= “valid” to the page mandate. We will cover
page directives and following under “directives” and ‘event handling’.
The page life cycle stages are:
- Initialization
- Creation of the controls on the page
- Rebuilding and support of the state.
- Execution of the event handler codes
- Page rendering
A thorough tutorial of Page cycle proves benificial in any stage of page life cycle.
Execution of Page Life Study can help in solving all errors in between any stage of Page
Life. This Tutirial additionally helps in creating custom controls and executing them at ideal
time, generate their properties with perspective state information and run control behaviour
code.
Taking after are the distinctive phases of an ASP.NET page:
- Page request
When ASP.NET gets a page demand, it chooses whether to parse and order
the page, or there would be a cached version of the page; in like manner the reaction is
sent.
- Beginning of page life cycle
At this stage, the Request and Response objects are set. In the event that
the request is an old demand or post back, the IsPostBack property of the page is set to
genuine.
The UICulture property of the page is additionally set.
- Page initialization
At this stage, the controls on the page are relegated unique ID by setting the
UniqueID property and the themes are applied. For another requests, postback information
is
stacked and the control properties are reestablished to the view-state values.
- Page load
At this stage, control properties are set to utilize the view state and control state
values.
- Validation
Validate technique for the approval control is called and on its fruitful execution, the
IsValid property of the page is set to genuine.
- Postback occasion handling
If the request is a postback (old demand), the related event
handler is appealed
- Page rendering
At this stage, view state for the page and all controls are spared. The page calls the
Render technique for every control and the yield of rendering is composed to the
OutputStream class
of the Response property of page.
- Unload
The rendered page is sent to the customer and page properties, for example, Response
and
Request, are emptied and all cleanup is done.
ASP.NET Page Life Cycle Events -
At every phase of the page life cycle, the page raises a few events, which could be coded.
Event handling is essentially a capacity or subroutine, bound to the event, utilizing
definitive traits, for example, Onclick or handle.
Taking after are the page life cycle occasions:
- PreInit
PreInit is the principal event in page life cycle. It checks the IsPostBack property and
figures out if the
page is a postback. It sets the themes and master pages, makes dynamic controls, and
gets and sets
profile property estimations. This event handling can be taken care of by over-burdening
the
OnPreInit strategy or making a Page_PreInit handler.
- Init
Init event introduces the control property and the control tree is constructed. This event
handling can
be taken care of by over-burdening the OnInit strategy or making a Page_Init handler.
- InitComplete
InitComplete occasion permits following of view state. All the controls turn on view state
following.
- LoadViewState
LoadViewState occasion permits loading view state data into the controls.
- LoadPostData
During this stage, the elements of all the information fields are characterized with the
<form> tag are
handled.
- PreLoad
PreLoad happens before the post back information is loaded in the controls. This event
can be taken
care of by over-burdening the OnPreLoad technique or making a Page_PreLoad handler.
- Load
The Load event is raised for the page first and after that repeatedly for all kid controls. The
controls in
the control tree are made. This event handling can be taken care of by over-burdening the
OnLoad
strategy or making a Page_Load handler.
- LoadComplete
The loading procedure is finished, control event handlers are run, and page validation
happens. This
event handling can be taken care of by over-burdening the OnLoadComplete strategy or
making a
Page_LoadComplete handler
- PreRender
The PreRender event happens just before the output is rendered. By taking care of this
event, pages
and controls can perform any upgrades before the output is rendered.
- PreRenderComplete
As the PreRender event is repeatedly let go for all type of controls, this event guarantees
the
consummation of the pre-rendering stage.
- SaveStateComplete
State of control on the page is spared. Personalization, control state and view state data is
spared. The
HTML markup is created. This stage can be taken care of by abrogating the Render
technique or
making a Page_Render handler.
- UnLoad
The UnLoad stage is the last period of the page life cycle. It raises the UnLoad event for all
controls repeatedly and in conclusion for the page itself. Last cleanup is done and all
assets and
references, for example, database associations, are liberated. This event handling can be
taken care of
by changing the OnUnLoad strategy or making a Page_UnLoad handler.
For .NET training and placement reviews, please do visit CRB Tech Reviews.

Weitere ähnliche Inhalte

Was ist angesagt?

Asp.net event handler
Asp.net event handlerAsp.net event handler
Asp.net event handlerSireesh K
 
ASP.NET Page Life Cycle
ASP.NET Page Life CycleASP.NET Page Life Cycle
ASP.NET Page Life CycleAbhishek Sur
 
Integrating Angular.js with Rails (Wicked Good Ruby Conf lightening talk)
Integrating Angular.js with Rails (Wicked Good Ruby Conf lightening talk)Integrating Angular.js with Rails (Wicked Good Ruby Conf lightening talk)
Integrating Angular.js with Rails (Wicked Good Ruby Conf lightening talk)Jonathan Linowes
 
Offline First with Service Worker
Offline First with Service WorkerOffline First with Service Worker
Offline First with Service WorkerMuhammad Samu
 
Progressive Web Apps 101
Progressive Web Apps 101Progressive Web Apps 101
Progressive Web Apps 101Muhammad Samu
 
Using Angular with Rails
Using Angular with RailsUsing Angular with Rails
Using Angular with RailsJamie Davidson
 

Was ist angesagt? (7)

Asp.net event handler
Asp.net event handlerAsp.net event handler
Asp.net event handler
 
ASP.NET Page Life Cycle
ASP.NET Page Life CycleASP.NET Page Life Cycle
ASP.NET Page Life Cycle
 
Life cycle of web page
Life cycle of web pageLife cycle of web page
Life cycle of web page
 
Integrating Angular.js with Rails (Wicked Good Ruby Conf lightening talk)
Integrating Angular.js with Rails (Wicked Good Ruby Conf lightening talk)Integrating Angular.js with Rails (Wicked Good Ruby Conf lightening talk)
Integrating Angular.js with Rails (Wicked Good Ruby Conf lightening talk)
 
Offline First with Service Worker
Offline First with Service WorkerOffline First with Service Worker
Offline First with Service Worker
 
Progressive Web Apps 101
Progressive Web Apps 101Progressive Web Apps 101
Progressive Web Apps 101
 
Using Angular with Rails
Using Angular with RailsUsing Angular with Rails
Using Angular with Rails
 

Andere mochten auch

Andere mochten auch (15)

Concepto de semáforo, exclusión mutua y sección critica
Concepto de semáforo, exclusión mutua y sección criticaConcepto de semáforo, exclusión mutua y sección critica
Concepto de semáforo, exclusión mutua y sección critica
 
NERMF Service Booklet
NERMF Service BookletNERMF Service Booklet
NERMF Service Booklet
 
Isabella e lohanna
Isabella e lohannaIsabella e lohanna
Isabella e lohanna
 
Matemática 3º ano
Matemática 3º anoMatemática 3º ano
Matemática 3º ano
 
Gabrielle e luana
Gabrielle e luanaGabrielle e luana
Gabrielle e luana
 
Trabajo de campo
Trabajo de campoTrabajo de campo
Trabajo de campo
 
aaaProblema de los filosofos
aaaProblema de los filosofosaaaProblema de los filosofos
aaaProblema de los filosofos
 
Cena filosofos c
Cena filosofos cCena filosofos c
Cena filosofos c
 
Filosofos cenando++
Filosofos cenando++Filosofos cenando++
Filosofos cenando++
 
Letra inicial
Letra inicialLetra inicial
Letra inicial
 
Completar com vogais 1º ano
Completar com vogais 1º anoCompletar com vogais 1º ano
Completar com vogais 1º ano
 
Solution smart lighning control
Solution smart lighning controlSolution smart lighning control
Solution smart lighning control
 
Teoría de autómatas
Teoría de autómatasTeoría de autómatas
Teoría de autómatas
 
Universidad fermín toro
Universidad fermín toroUniversidad fermín toro
Universidad fermín toro
 
Whitney L. Scott Resume 2017
Whitney L. Scott Resume 2017Whitney L. Scott Resume 2017
Whitney L. Scott Resume 2017
 

Ähnlich wie Asp dot net lifecycle in details

ASP.NET - Life cycle of asp
ASP.NET - Life cycle of aspASP.NET - Life cycle of asp
ASP.NET - Life cycle of asppriya Nithya
 
Parallelminds.asp.net with sp
Parallelminds.asp.net with spParallelminds.asp.net with sp
Parallelminds.asp.net with spparallelminder
 
Aspnetpagelifecycle 101129103702-phpapp02
Aspnetpagelifecycle 101129103702-phpapp02Aspnetpagelifecycle 101129103702-phpapp02
Aspnetpagelifecycle 101129103702-phpapp02santoshkjogalekar
 
Aspnet life cycle events
Aspnet life cycle eventsAspnet life cycle events
Aspnet life cycle eventsTrushant parkar
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NETPeter Gfader
 
Page life cycle
Page life cyclePage life cycle
Page life cycleanil4691
 
Building Modern Web Applications using React and Redux
 Building Modern Web Applications using React and Redux Building Modern Web Applications using React and Redux
Building Modern Web Applications using React and ReduxMaxime Najim
 
Server Controls of ASP.Net
Server Controls of ASP.NetServer Controls of ASP.Net
Server Controls of ASP.NetHitesh Santani
 
Chanhao Jiang And David Wei Presentation Quickling Pagecache
Chanhao Jiang And David Wei Presentation Quickling PagecacheChanhao Jiang And David Wei Presentation Quickling Pagecache
Chanhao Jiang And David Wei Presentation Quickling PagecacheAjax Experience 2009
 
13 asp.net session19
13 asp.net session1913 asp.net session19
13 asp.net session19Vivek chan
 
Rest web service_with_spring_hateoas
Rest web service_with_spring_hateoasRest web service_with_spring_hateoas
Rest web service_with_spring_hateoasZeid Hassan
 
Harish Understanding Aspnet
Harish Understanding AspnetHarish Understanding Aspnet
Harish Understanding Aspnetrsnarayanan
 
ASP.Net Presentation Part1
ASP.Net Presentation Part1ASP.Net Presentation Part1
ASP.Net Presentation Part1Neeraj Mathur
 
Asp .net web form fundamentals
Asp .net web form fundamentalsAsp .net web form fundamentals
Asp .net web form fundamentalsGopal Ji Singh
 

Ähnlich wie Asp dot net lifecycle in details (20)

ASP.NET - Life cycle of asp
ASP.NET - Life cycle of aspASP.NET - Life cycle of asp
ASP.NET - Life cycle of asp
 
Parallelminds.asp.net with sp
Parallelminds.asp.net with spParallelminds.asp.net with sp
Parallelminds.asp.net with sp
 
Aspnetpagelifecycle 101129103702-phpapp02
Aspnetpagelifecycle 101129103702-phpapp02Aspnetpagelifecycle 101129103702-phpapp02
Aspnetpagelifecycle 101129103702-phpapp02
 
Aspnet life cycle events
Aspnet life cycle eventsAspnet life cycle events
Aspnet life cycle events
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NET
 
Page life cycle
Page life cyclePage life cycle
Page life cycle
 
Web controls
Web controlsWeb controls
Web controls
 
As pnet pagelife_usha
As pnet pagelife_ushaAs pnet pagelife_usha
As pnet pagelife_usha
 
Building Modern Web Applications using React and Redux
 Building Modern Web Applications using React and Redux Building Modern Web Applications using React and Redux
Building Modern Web Applications using React and Redux
 
Server Controls of ASP.Net
Server Controls of ASP.NetServer Controls of ASP.Net
Server Controls of ASP.Net
 
Let's react - Meetup
Let's react - MeetupLet's react - Meetup
Let's react - Meetup
 
NET_Training.pptx
NET_Training.pptxNET_Training.pptx
NET_Training.pptx
 
Chanhao Jiang And David Wei Presentation Quickling Pagecache
Chanhao Jiang And David Wei Presentation Quickling PagecacheChanhao Jiang And David Wei Presentation Quickling Pagecache
Chanhao Jiang And David Wei Presentation Quickling Pagecache
 
13 asp.net session19
13 asp.net session1913 asp.net session19
13 asp.net session19
 
Rest web service_with_spring_hateoas
Rest web service_with_spring_hateoasRest web service_with_spring_hateoas
Rest web service_with_spring_hateoas
 
ASP.NET Lecture 2
ASP.NET Lecture 2ASP.NET Lecture 2
ASP.NET Lecture 2
 
Web forms in ASP.net
Web forms in ASP.netWeb forms in ASP.net
Web forms in ASP.net
 
Harish Understanding Aspnet
Harish Understanding AspnetHarish Understanding Aspnet
Harish Understanding Aspnet
 
ASP.Net Presentation Part1
ASP.Net Presentation Part1ASP.Net Presentation Part1
ASP.Net Presentation Part1
 
Asp .net web form fundamentals
Asp .net web form fundamentalsAsp .net web form fundamentals
Asp .net web form fundamentals
 

Kürzlich hochgeladen

Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonJericReyAuditor
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 

Kürzlich hochgeladen (20)

Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lesson
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 

Asp dot net lifecycle in details

  • 2. ASP.NET life cycle guides in a brief tutorial about how : - ASP.NET forms pages to create dynamic yield - ASP.NET accumulates the pages progressively - The application and its pages are initiated and handled The ASP.NET life cycle could be partitioned into two gatherings: - Application Life Cycle - Page Life Cycle The application life cycle has the certain accompanying stages: - Client makes a manual request for getting access to the source page. Program sends this request to the web server. ASP.NET life cycle guides in a brief tutorial about how : - ASP.NET forms pages to create dynamic yield - ASP.NET accumulates the pages progressively - The application and its pages are initiated and handled
  • 3. The ASP.NET life cycle could be partitioned into two gatherings: - Application Life Cycle - Page Life Cycle The application life cycle has the certain accompanying stages: - Client makes a manual request for getting access to the source page. Program sends ASP.NET life cycle guides in a brief tutorial about how : - ASP.NET forms pages to create dynamic yield - ASP.NET accumulates the pages progressively - The application and its pages are initiated and handled The ASP.NET life cycle could be partitioned into two gatherings: - Application Life Cycle - Page Life Cycle The application life cycle has the certain accompanying stages:
  • 4. - Client makes a manual request for getting access to the source page. Program sends this request to the web server. - A common pipeline gets the main request and the accompanying situations take place: - An object of the class ApplicationManager is made. - An object of the class HostingEnvironment is made to give manual data with respect to the assets. - Top level things in the application are assembled. - Reaction articles are made. The application protests, for example, HttpContext, HttpRequest and HttpResponse are made and introduced. - An occurrence of the HttpApplication article is made and doled out to the request. - The request is handled by the HttpApplication class. Diverse occasions are raised by this class for handling the request.
  • 5. At the point when a page is requested for, it is executed into the server memory, handled, and sent to the program. Later it is unloaded from the memory. In between at every stage, techniques and events are accessible, which could be rejected or canceled by need of the application. Rather, you can compose a manual particular code to reject the default code. The Page class makes a tree arranged in order of ranks, of all the controls on the page. All the elements of the page beside the directives, are a part of this control tree. You can see the control tree by including trace= “valid” to the page mandate. We will cover page directives and following under “directives” and ‘event handling’. The page life cycle stages are: - Initialization - Creation of the controls on the page - Rebuilding and support of the state. - Execution of the event handler codes - Page rendering A thorough tutorial of Page cycle proves benificial in any stage of page life cycle.
  • 6. Execution of Page Life Study can help in solving all errors in between any stage of Page Life. This Tutirial additionally helps in creating custom controls and executing them at ideal time, generate their properties with perspective state information and run control behaviour code. Taking after are the distinctive phases of an ASP.NET page: - Page request When ASP.NET gets a page demand, it chooses whether to parse and order the page, or there would be a cached version of the page; in like manner the reaction is sent. - Beginning of page life cycle At this stage, the Request and Response objects are set. In the event that the request is an old demand or post back, the IsPostBack property of the page is set to genuine. The UICulture property of the page is additionally set. - Page initialization At this stage, the controls on the page are relegated unique ID by setting the UniqueID property and the themes are applied. For another requests, postback information is
  • 7. stacked and the control properties are reestablished to the view-state values. - Page load At this stage, control properties are set to utilize the view state and control state values. - Validation Validate technique for the approval control is called and on its fruitful execution, the IsValid property of the page is set to genuine. - Postback occasion handling If the request is a postback (old demand), the related event handler is appealed - Page rendering At this stage, view state for the page and all controls are spared. The page calls the Render technique for every control and the yield of rendering is composed to the OutputStream class of the Response property of page.
  • 8. - Unload The rendered page is sent to the customer and page properties, for example, Response and Request, are emptied and all cleanup is done. ASP.NET Page Life Cycle Events - At every phase of the page life cycle, the page raises a few events, which could be coded. Event handling is essentially a capacity or subroutine, bound to the event, utilizing definitive traits, for example, Onclick or handle. Taking after are the page life cycle occasions: - PreInit PreInit is the principal event in page life cycle. It checks the IsPostBack property and figures out if the page is a postback. It sets the themes and master pages, makes dynamic controls, and gets and sets profile property estimations. This event handling can be taken care of by over-burdening the OnPreInit strategy or making a Page_PreInit handler.
  • 9. - Init Init event introduces the control property and the control tree is constructed. This event handling can be taken care of by over-burdening the OnInit strategy or making a Page_Init handler. - InitComplete InitComplete occasion permits following of view state. All the controls turn on view state following. - LoadViewState LoadViewState occasion permits loading view state data into the controls. - LoadPostData During this stage, the elements of all the information fields are characterized with the <form> tag are handled. - PreLoad PreLoad happens before the post back information is loaded in the controls. This event can be taken
  • 10. care of by over-burdening the OnPreLoad technique or making a Page_PreLoad handler. - Load The Load event is raised for the page first and after that repeatedly for all kid controls. The controls in the control tree are made. This event handling can be taken care of by over-burdening the OnLoad strategy or making a Page_Load handler. - LoadComplete The loading procedure is finished, control event handlers are run, and page validation happens. This event handling can be taken care of by over-burdening the OnLoadComplete strategy or making a Page_LoadComplete handler - PreRender The PreRender event happens just before the output is rendered. By taking care of this event, pages and controls can perform any upgrades before the output is rendered.
  • 11. - PreRenderComplete As the PreRender event is repeatedly let go for all type of controls, this event guarantees the consummation of the pre-rendering stage. - SaveStateComplete State of control on the page is spared. Personalization, control state and view state data is spared. The HTML markup is created. This stage can be taken care of by abrogating the Render technique or making a Page_Render handler. - UnLoad The UnLoad stage is the last period of the page life cycle. It raises the UnLoad event for all controls repeatedly and in conclusion for the page itself. Last cleanup is done and all assets and references, for example, database associations, are liberated. This event handling can be taken care of by changing the OnUnLoad strategy or making a Page_UnLoad handler.
  • 12. For .NET training and placement reviews, please do visit CRB Tech Reviews.