SlideShare a Scribd company logo
1 of 13
Visit: http://crbtech.in/Dot-Net-Training/
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
Visit: http://crbtech.in/Dot-Net-Training/
ASP.NET Application 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.
Visit: http://crbtech.in/Dot-Net-Training/
- 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.
Visit: http://crbtech.in/Dot-Net-Training/
ASP.NET Page Life Cycle
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.
Visit: http://crbtech.in/Dot-Net-Training/
Visit: http://crbtech.in/Dot-Net-Training/
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.
Visit: http://crbtech.in/Dot-Net-Training/
- 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 Is Valid
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
Visit: http://crbtech.in/Dot-Net-Training/
- 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.
Visit: http://crbtech.in/Dot-Net-Training/
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.
Visit: http://crbtech.in/Dot-Net-Training/
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
Visit: http://crbtech.in/Dot-Net-Training/
- 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.
Visit: http://crbtech.in/Dot-Net-Training/
- 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.
lTHANK YOU
Visit: http://crbtech.in/Dot-Net-Training/

More Related Content

What's hot

ASP.Net Presentation Part1
ASP.Net Presentation Part1ASP.Net Presentation Part1
ASP.Net Presentation Part1
Neeraj Mathur
 
ASP.NET AJAX Basics
ASP.NET AJAX BasicsASP.NET AJAX Basics
ASP.NET AJAX Basics
petrov
 

What's hot (18)

Asp.net life cycle
Asp.net life cycleAsp.net life cycle
Asp.net life cycle
 
Asp.net control
Asp.net controlAsp.net control
Asp.net control
 
Parallelminds.asp.net with sp
Parallelminds.asp.net with spParallelminds.asp.net with sp
Parallelminds.asp.net with sp
 
Life cycle of web page
Life cycle of web pageLife cycle of web page
Life cycle of web page
 
Progressive Web Apps 101
Progressive Web Apps 101Progressive Web Apps 101
Progressive Web Apps 101
 
Page life cycle
Page life cyclePage life cycle
Page life cycle
 
Building React CRUD app in minutes?
Building React CRUD app in minutes?Building React CRUD app in minutes?
Building React CRUD app in minutes?
 
Jax Ws2.0
Jax Ws2.0Jax Ws2.0
Jax Ws2.0
 
Service Worker - Reliability bits
Service Worker - Reliability bitsService Worker - Reliability bits
Service Worker - Reliability bits
 
Real World Lessons in Progressive Web Application & Service Worker Caching
Real World Lessons in Progressive Web Application & Service Worker CachingReal World Lessons in Progressive Web Application & Service Worker Caching
Real World Lessons in Progressive Web Application & Service Worker Caching
 
Chapter 25
Chapter 25Chapter 25
Chapter 25
 
Service workers
Service workersService workers
Service workers
 
ASP.Net Presentation Part1
ASP.Net Presentation Part1ASP.Net Presentation Part1
ASP.Net Presentation Part1
 
Service workers
Service workersService workers
Service workers
 
Ajax & ASP.NET 2
Ajax & ASP.NET 2Ajax & ASP.NET 2
Ajax & ASP.NET 2
 
ASP.NET AJAX Basics
ASP.NET AJAX BasicsASP.NET AJAX Basics
ASP.NET AJAX Basics
 
Html5 offline
Html5 offlineHtml5 offline
Html5 offline
 
Spring Boot Actuator
Spring Boot ActuatorSpring Boot Actuator
Spring Boot Actuator
 

Viewers also liked

Metallica
MetallicaMetallica
Metallica
aarra
 
Designing an ExtJS user login panel
Designing an ExtJS user login panelDesigning an ExtJS user login panel
Designing an ExtJS user login panel
Arun Prasad
 
Life as an asp.net programmer
Life as an asp.net programmerLife as an asp.net programmer
Life as an asp.net programmer
Arun Prasad
 
State management
State managementState management
State management
Iblesoft
 

Viewers also liked (9)

Metallica
MetallicaMetallica
Metallica
 
Ext js user login panel
Ext js user login panelExt js user login panel
Ext js user login panel
 
Designing an ExtJS user login panel
Designing an ExtJS user login panelDesigning an ExtJS user login panel
Designing an ExtJS user login panel
 
Introduction to ExtJS lesson 01 Part two
Introduction to ExtJS lesson 01 Part twoIntroduction to ExtJS lesson 01 Part two
Introduction to ExtJS lesson 01 Part two
 
Life as an asp.net programmer
Life as an asp.net programmerLife as an asp.net programmer
Life as an asp.net programmer
 
Introduction to ExtJS
Introduction to ExtJSIntroduction to ExtJS
Introduction to ExtJS
 
State management in ASP.NET
State management in ASP.NETState management in ASP.NET
State management in ASP.NET
 
ASP.NET State management
ASP.NET State managementASP.NET State management
ASP.NET State management
 
State management
State managementState management
State management
 

Similar to Asp.net life cycle in depth

Aspnetpagelifecycle 101129103702-phpapp02
Aspnetpagelifecycle 101129103702-phpapp02Aspnetpagelifecycle 101129103702-phpapp02
Aspnetpagelifecycle 101129103702-phpapp02
santoshkjogalekar
 
Aspnet life cycle events
Aspnet life cycle eventsAspnet life cycle events
Aspnet life cycle events
Trushant parkar
 
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
Ajax Experience 2009
 

Similar to Asp.net life cycle in depth (20)

Why ASP.NET Development is Important?
Why ASP.NET Development is Important?Why ASP.NET Development is Important?
Why ASP.NET Development is Important?
 
ASP.NET - Life cycle of asp
ASP.NET - Life cycle of aspASP.NET - Life cycle of asp
ASP.NET - Life cycle of asp
 
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
 
Web controls
Web controlsWeb controls
Web controls
 
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
 
Server Controls of ASP.Net
Server Controls of ASP.NetServer Controls of ASP.Net
Server Controls of ASP.Net
 
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
 
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
 
NET_Training.pptx
NET_Training.pptxNET_Training.pptx
NET_Training.pptx
 
Browser Based Performance Testing and Tuning
Browser Based Performance Testing and TuningBrowser Based Performance Testing and Tuning
Browser Based Performance Testing and Tuning
 
Flows - what you should know before implementing
Flows - what you should know before implementingFlows - what you should know before implementing
Flows - what you should know before implementing
 
Web forms in ASP.net
Web forms in ASP.netWeb forms in ASP.net
Web forms in ASP.net
 
Антон Серпутько “Testing and optimization of client-side performance”
Антон Серпутько “Testing and optimization of client-side performance” Антон Серпутько “Testing and optimization of client-side performance”
Антон Серпутько “Testing and optimization of client-side performance”
 
How to navigate programmatically using react router
How to navigate programmatically using react routerHow to navigate programmatically using react router
How to navigate programmatically using react router
 
Let's react - Meetup
Let's react - MeetupLet's react - Meetup
Let's react - Meetup
 
Rest web service_with_spring_hateoas
Rest web service_with_spring_hateoasRest web service_with_spring_hateoas
Rest web service_with_spring_hateoas
 
Modeling Safe Interface Interactions in Web Applications (ER´09)
Modeling Safe Interface Interactions in Web Applications (ER´09)Modeling Safe Interface Interactions in Web Applications (ER´09)
Modeling Safe Interface Interactions in Web Applications (ER´09)
 

More from sonia merchant

More from sonia merchant (20)

What does dot net hold for 2016?
What does dot net hold for 2016?What does dot net hold for 2016?
What does dot net hold for 2016?
 
What does .net hold for 2016?
What does .net hold for 2016?What does .net hold for 2016?
What does .net hold for 2016?
 
Data protection api's in asp dot net
Data protection api's in asp dot netData protection api's in asp dot net
Data protection api's in asp dot net
 
Authorization p iv
Authorization p ivAuthorization p iv
Authorization p iv
 
Authorization iii
Authorization iiiAuthorization iii
Authorization iii
 
Authorization in asp dot net part 2
Authorization in asp dot net part 2Authorization in asp dot net part 2
Authorization in asp dot net part 2
 
Asp dot-net core problems and fixes
Asp dot-net core problems and fixes Asp dot-net core problems and fixes
Asp dot-net core problems and fixes
 
Search page-with-elasticsearch-and-dot-net
Search page-with-elasticsearch-and-dot-netSearch page-with-elasticsearch-and-dot-net
Search page-with-elasticsearch-and-dot-net
 
Build a-search-page-with-elastic search-and-dot-net
Build a-search-page-with-elastic search-and-dot-netBuild a-search-page-with-elastic search-and-dot-net
Build a-search-page-with-elastic search-and-dot-net
 
How to optimize asp dot-net application
How to optimize asp dot-net applicationHow to optimize asp dot-net application
How to optimize asp dot-net application
 
How to optimize asp dot net application ?
How to optimize asp dot net application ?How to optimize asp dot net application ?
How to optimize asp dot net application ?
 
10 things to remember
10 things to remember10 things to remember
10 things to remember
 
Learn dot net attributes
Learn dot net attributesLearn dot net attributes
Learn dot net attributes
 
Learn about dot net attributes
Learn about dot net attributesLearn about dot net attributes
Learn about dot net attributes
 
Owin and-katana-overview
Owin and-katana-overviewOwin and-katana-overview
Owin and-katana-overview
 
Top 15-asp-dot-net-interview-questions-and-answers
Top 15-asp-dot-net-interview-questions-and-answersTop 15-asp-dot-net-interview-questions-and-answers
Top 15-asp-dot-net-interview-questions-and-answers
 
Next generation asp.net v next
Next generation asp.net v nextNext generation asp.net v next
Next generation asp.net v next
 
Dot net universal apps
Dot net universal appsDot net universal apps
Dot net universal apps
 
Browser frame building with c# and vb dot net
Browser frame building  with c# and vb dot netBrowser frame building  with c# and vb dot net
Browser frame building with c# and vb dot net
 
A simplest-way-to-reconstruct-.net-framework
A simplest-way-to-reconstruct-.net-frameworkA simplest-way-to-reconstruct-.net-framework
A simplest-way-to-reconstruct-.net-framework
 

Recently uploaded

會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
中 央社
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
EADTU
 

Recently uploaded (20)

demyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxdemyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptx
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
Book Review of Run For Your Life Powerpoint
Book Review of Run For Your Life PowerpointBook Review of Run For Your Life Powerpoint
Book Review of Run For Your Life Powerpoint
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge App
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
Scopus Indexed Journals 2024 - ISCOPUS Publications
Scopus Indexed Journals 2024 - ISCOPUS PublicationsScopus Indexed Journals 2024 - ISCOPUS Publications
Scopus Indexed Journals 2024 - ISCOPUS Publications
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
 
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhĐề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptx
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical Principles
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptx
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDF
 
Supporting Newcomer Multilingual Learners
Supporting Newcomer  Multilingual LearnersSupporting Newcomer  Multilingual Learners
Supporting Newcomer Multilingual Learners
 

Asp.net life cycle in depth

  • 1. Visit: http://crbtech.in/Dot-Net-Training/ 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
  • 2. Visit: http://crbtech.in/Dot-Net-Training/ ASP.NET Application 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.
  • 3. Visit: http://crbtech.in/Dot-Net-Training/ - 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.
  • 4. Visit: http://crbtech.in/Dot-Net-Training/ ASP.NET Page Life Cycle 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.
  • 6. Visit: http://crbtech.in/Dot-Net-Training/ 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.
  • 7. Visit: http://crbtech.in/Dot-Net-Training/ - 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 Is Valid 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
  • 8. Visit: http://crbtech.in/Dot-Net-Training/ - 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.
  • 9. Visit: http://crbtech.in/Dot-Net-Training/ 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.
  • 10. Visit: http://crbtech.in/Dot-Net-Training/ 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
  • 11. Visit: http://crbtech.in/Dot-Net-Training/ - 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.
  • 12. Visit: http://crbtech.in/Dot-Net-Training/ - 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.