SlideShare une entreprise Scribd logo
1  sur  24
Presented By : Abhishek Sur
http://www.abhisheksur.com/
Table of Content
 Introduction
 Application Life Cycle
    IIS Request Process
    Application Pool
    Worker Process
    HTTP Handler/Module
 ASP.NET Page Life Cycle
    Page Life Cycle Steps
    Page Life Cycle Events
 Life Cycle for Master Page and User Control
 QA
Introduction
 When Clients request for an aspx page from browser
  and lot of stuffs happens in background to produce the
  output or sending response to client. This evolves
  ASP.NET Page Lifecycle.
 ASP.NET Page Life Cycle is very much important to
  know for each and every developer to developed an
  ASP.NET Web Application.
 All events, data processing, dynamic control
  creation, view state, postback, rendering etc. are
  depends with Page Life Cycle.
Application Life Cycle
 1.   Client Request For Information
 2.   Request comes to Server
 3.   Server Process the request
 4.   Send the response back to Client
Application Life Cycle - Contd.
 Key terms to remember
    HTTP.SYS
    WAS
    Application Pool
    Worker Process




  http://blogs.thesitedoctor.co.uk/tim/2006/06/30/Complete+Lifecycle+Of+A
  n+ASPNet+Page+And+Controls.aspx
Application Life Cycle – Contd.
 Key Terms To Remember
    Http Module
    Http Handler
    Http Pipeline
End Of Application Life Cycle – Start Page Life Cycle
  Request Passes Through HTTP Pipe Line
  This Start Page Life Cycle
ASP.NET Page Life Cycle Begins
 Start
 Initialization   S   I   L
 Load
 Validation       R   E   V
 Events
 Render
Page Life Cycle - Start
 Client Request For Resource
 Request Comes To Server (IIS)
 IIS Process the Initial Processing
 Request Passed through HTTP- Pipe Line
 ASP.NET Page Life Cycle Starts
Page Life Cycle - Initialization
 Set Postback properties
 Unique ID for Each Control in the Page
 Themes needs to be initialized
 Dynamic control need to be created
Page Life Cycle - Load
 If the Request is the post back request then it loads
  data from View States and Control State
Page Life Cycle - Validation
 Validate the pages Control
 Updates the IsValid property
Page Life Cycle - Events
 This will only fired if the request is an postback event.
 Like, if the post back is happened for an Button Click.
  Button Click event will fired.
Page Life Cycle - Render
 Before Rendering All View State data has been set.
 Render() method for all control has been called and
 write the out put on output stream.
Page Life Cycle - Events




   http://msdn.microsoft.com/en-us/library/ms178472.aspx
ASP.NET Page Life Cycle Events
 PreInit
 Init
 PreLoad
 Load
 Control Events
 PreRender
 SaveViewState
 Render
 Unload
Page Life Cycle – Events
 PreInit()
        This is the first event which raised in asp.net page lifecycle
        Check for Request is for Post Back or not.
        All dynamic control need to be created
        Theme Change, Master Page Set at runtime
 Init()
        Raised after all controls have been initialized
        Build up a tree of controls from the ASPX file
        Turn on view state monitoring – any changes in control will be
         tracked by View State for future.
Page Life Cycle - Events
 PreLoad()
       Load view state data for page and controls
       Load Postback data if needed
       We can process any kind operation that need to perform
        before page load
 Load()
       OnLoad methods control called for each and every control
       We can create the connection initialization for any kind of
        external source like database connection
       We can also set the control properties
Page Life Cycle - Events
 Control Events
       If this is an postback request , Corresponding events will triggered.
        Like, if the post back is happing for button click, then Button_Click
        Event will fired.
 PreRender
       Each control of the page has a PreRender event which is being
        invoked.
       EnsureChildControls is also being called during this events
       DataBind method for all control has also been called
       If we want to change any thing to any control this is the last event
        where we can do because after the pageRender starts
Page Life Cycle - Events
 SaveViewState
       ViewState Monitoring is turned off as here all the ViewState
        Data need to be saved.
       View State data saved in hidden filed called _VIEWSTATE
 Render
       Pages calls the Render method for each and every control.
       Text writer that writes the output to the as output stream
       Output steam set to the page's Response property.
Page Life Cycle - Events
 Unload
       This is the last event of asp.net page life cycle
       This ensure the Request and Response has been set to null.
       This is called only after the content of the page fully rendered
        and response sent to client
Page Life Cycle - Master Page and User Controls
 MasterPage gets initialized from the Page class in the init phaze
    of page. The content of Masterpage gets loaded side by side as
    the page gets loaded.
   User control will be initialized and added to the page and before
    page gets initialized
   After page Onload, MasterPage_OnLoad gets called and
    UserControl_Onload gets called sequentially.
   Followed by each of Page events, masterPage events gets called
    and next Usercontrol events are called.
   During the unload phaze, Usercontrol gets unloaded first and
    then masterpage and Page in sequence.
   For further reference refer to :
    http://blogs.thesitedoctor.co.uk/tim/2006/06/30/Complete+Life
    cycle+Of+An+ASPNet+Page+And+Controls.aspx
Q/A
Thank you

Contenu connexe

Tendances

ASP.NET - Life cycle of asp
ASP.NET - Life cycle of aspASP.NET - Life cycle of asp
ASP.NET - Life cycle of asppriya Nithya
 
ASP.NET Page Life Cycle
ASP.NET Page Life CycleASP.NET Page Life Cycle
ASP.NET Page Life CycleAbhishek Sur
 
Asp.net life cycle
Asp.net life cycleAsp.net life cycle
Asp.net life cycleIrfaan Khan
 
Offline First with Service Worker
Offline First with Service WorkerOffline First with Service Worker
Offline First with Service WorkerMuhammad Samu
 
Asp dot net lifecycle in details
Asp dot net lifecycle in detailsAsp dot net lifecycle in details
Asp dot net lifecycle in detailsAyesha Khan
 
GigaSpaces Scalability Live Demo
GigaSpaces Scalability Live DemoGigaSpaces Scalability Live Demo
GigaSpaces Scalability Live DemoNati Shalom
 
Weblogic as a windows service
Weblogic as a windows serviceWeblogic as a windows service
Weblogic as a windows serviceRavi Kumar Lanke
 
Ajax pagination using j query in rails3
Ajax pagination using j query in rails3Ajax pagination using j query in rails3
Ajax pagination using j query in rails3Andolasoft Inc
 
Orchestrate Event-Driven Infrastructure with SaltStack
Orchestrate Event-Driven Infrastructure with SaltStackOrchestrate Event-Driven Infrastructure with SaltStack
Orchestrate Event-Driven Infrastructure with SaltStackLove Nyberg
 
Service workers and the role they play in modern day web apps
Service workers and the role they play in modern day web appsService workers and the role they play in modern day web apps
Service workers and the role they play in modern day web appsMukul Jain
 
Tracking Event validator
Tracking Event validatorTracking Event validator
Tracking Event validatorHokila Jan
 
TuleapCon 2018. Tuleap Development circa end of march 2018
TuleapCon 2018. Tuleap Development circa end of march 2018TuleapCon 2018. Tuleap Development circa end of march 2018
TuleapCon 2018. Tuleap Development circa end of march 2018Tuleap
 
React Meetup 2
React Meetup 2React Meetup 2
React Meetup 2redbadger
 
Git cheat sheet_dark
Git cheat sheet_darkGit cheat sheet_dark
Git cheat sheet_darkKing Hom
 

Tendances (20)

ASP.NET - Life cycle of asp
ASP.NET - Life cycle of aspASP.NET - Life cycle of asp
ASP.NET - Life cycle of asp
 
ASP.NET Page Life Cycle
ASP.NET Page Life CycleASP.NET Page Life Cycle
ASP.NET Page Life Cycle
 
Page life cycle
Page life cyclePage life cycle
Page life cycle
 
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
 
Offline First with Service Worker
Offline First with Service WorkerOffline First with Service Worker
Offline First with Service Worker
 
Asp dot net lifecycle in details
Asp dot net lifecycle in detailsAsp dot net lifecycle in details
Asp dot net lifecycle in details
 
feo-report
feo-reportfeo-report
feo-report
 
Life cycle of web page
Life cycle of web pageLife cycle of web page
Life cycle of web page
 
GigaSpaces Scalability Live Demo
GigaSpaces Scalability Live DemoGigaSpaces Scalability Live Demo
GigaSpaces Scalability Live Demo
 
METEOR 101
METEOR 101METEOR 101
METEOR 101
 
Weblogic as a windows service
Weblogic as a windows serviceWeblogic as a windows service
Weblogic as a windows service
 
Ajax pagination using j query in rails3
Ajax pagination using j query in rails3Ajax pagination using j query in rails3
Ajax pagination using j query in rails3
 
Orchestrate Event-Driven Infrastructure with SaltStack
Orchestrate Event-Driven Infrastructure with SaltStackOrchestrate Event-Driven Infrastructure with SaltStack
Orchestrate Event-Driven Infrastructure with SaltStack
 
Service workers and the role they play in modern day web apps
Service workers and the role they play in modern day web appsService workers and the role they play in modern day web apps
Service workers and the role they play in modern day web apps
 
2310 b 05
2310 b 052310 b 05
2310 b 05
 
Tracking Event validator
Tracking Event validatorTracking Event validator
Tracking Event validator
 
TuleapCon 2018. Tuleap Development circa end of march 2018
TuleapCon 2018. Tuleap Development circa end of march 2018TuleapCon 2018. Tuleap Development circa end of march 2018
TuleapCon 2018. Tuleap Development circa end of march 2018
 
React Meetup 2
React Meetup 2React Meetup 2
React Meetup 2
 
Git cheat sheet_dark
Git cheat sheet_darkGit cheat sheet_dark
Git cheat sheet_dark
 

En vedette

Bsc FOOD PRODUCTION question and answer
Bsc FOOD PRODUCTION  question and answerBsc FOOD PRODUCTION  question and answer
Bsc FOOD PRODUCTION question and answerProfessor
 
3 punches for knock-out PR
3 punches for knock-out PR3 punches for knock-out PR
3 punches for knock-out PRDara Quackenbush
 
Book trailer image search
Book trailer image searchBook trailer image search
Book trailer image searchKaren Edmundson
 
Facebook Graph Search's buzz on Twitter
Facebook Graph Search's buzz on TwitterFacebook Graph Search's buzz on Twitter
Facebook Graph Search's buzz on TwitterHardik Joshi
 
Social Media Trends - India
Social Media Trends - IndiaSocial Media Trends - India
Social Media Trends - IndiaHardik Joshi
 
cameras karthick066
cameras karthick066cameras karthick066
cameras karthick066jkarthick
 
Metrics, Pitfalls and Useful Metrics
Metrics, Pitfalls and Useful MetricsMetrics, Pitfalls and Useful Metrics
Metrics, Pitfalls and Useful MetricsAjay Balamurugadas
 
Ilmu membaca dan kemahiran membaca serta keperluannya
Ilmu membaca dan kemahiran membaca serta keperluannyaIlmu membaca dan kemahiran membaca serta keperluannya
Ilmu membaca dan kemahiran membaca serta keperluannyamonaqis
 
Why's portfolio
Why's portfolioWhy's portfolio
Why's portfolioiamwhy
 
Bsc question and answer
Bsc question and answerBsc question and answer
Bsc question and answerProfessor
 
Making Sure Your Content is Seen & Shared: Trends in PR and Content Marketing
Making Sure Your Content is Seen & Shared: Trends in PR and Content MarketingMaking Sure Your Content is Seen & Shared: Trends in PR and Content Marketing
Making Sure Your Content is Seen & Shared: Trends in PR and Content MarketingDara Quackenbush
 
Brands with 1 million plus fans on Facebook
Brands with 1 million plus fans on FacebookBrands with 1 million plus fans on Facebook
Brands with 1 million plus fans on FacebookHardik Joshi
 

En vedette (16)

Bsc FOOD PRODUCTION question and answer
Bsc FOOD PRODUCTION  question and answerBsc FOOD PRODUCTION  question and answer
Bsc FOOD PRODUCTION question and answer
 
3 punches for knock-out PR
3 punches for knock-out PR3 punches for knock-out PR
3 punches for knock-out PR
 
Book trailer image search
Book trailer image searchBook trailer image search
Book trailer image search
 
Facebook Graph Search's buzz on Twitter
Facebook Graph Search's buzz on TwitterFacebook Graph Search's buzz on Twitter
Facebook Graph Search's buzz on Twitter
 
Crossfire
CrossfireCrossfire
Crossfire
 
Social Media Trends - India
Social Media Trends - IndiaSocial Media Trends - India
Social Media Trends - India
 
The future of learning is informal and mobile
The future of learning is informal and mobileThe future of learning is informal and mobile
The future of learning is informal and mobile
 
cameras karthick066
cameras karthick066cameras karthick066
cameras karthick066
 
Metrics, Pitfalls and Useful Metrics
Metrics, Pitfalls and Useful MetricsMetrics, Pitfalls and Useful Metrics
Metrics, Pitfalls and Useful Metrics
 
Ilmu membaca dan kemahiran membaca serta keperluannya
Ilmu membaca dan kemahiran membaca serta keperluannyaIlmu membaca dan kemahiran membaca serta keperluannya
Ilmu membaca dan kemahiran membaca serta keperluannya
 
Why's portfolio
Why's portfolioWhy's portfolio
Why's portfolio
 
Bsc question and answer
Bsc question and answerBsc question and answer
Bsc question and answer
 
Making Sure Your Content is Seen & Shared: Trends in PR and Content Marketing
Making Sure Your Content is Seen & Shared: Trends in PR and Content MarketingMaking Sure Your Content is Seen & Shared: Trends in PR and Content Marketing
Making Sure Your Content is Seen & Shared: Trends in PR and Content Marketing
 
Brands with 1 million plus fans on Facebook
Brands with 1 million plus fans on FacebookBrands with 1 million plus fans on Facebook
Brands with 1 million plus fans on Facebook
 
Rubrics presentation 4.3.a
Rubrics presentation 4.3.aRubrics presentation 4.3.a
Rubrics presentation 4.3.a
 
Powerpoint Maria vai com as outras
Powerpoint Maria vai com as outrasPowerpoint Maria vai com as outras
Powerpoint Maria vai com as outras
 

Similaire à Aspnetpagelifecycle 101129103702-phpapp02

Parallelminds.asp.net with sp
Parallelminds.asp.net with spParallelminds.asp.net with sp
Parallelminds.asp.net with spparallelminder
 
Aspnet life cycle events
Aspnet life cycle eventsAspnet life cycle events
Aspnet life cycle eventsTrushant parkar
 
Why ASP.NET Development is Important?
Why ASP.NET Development is Important?Why ASP.NET Development is Important?
Why ASP.NET Development is Important?Ayesha Khan
 
Server Controls of ASP.Net
Server Controls of ASP.NetServer Controls of ASP.Net
Server Controls of ASP.NetHitesh Santani
 
Page life cycle
Page life cyclePage life cycle
Page life cycleanil4691
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NETPeter Gfader
 
ASP.Net Presentation Part1
ASP.Net Presentation Part1ASP.Net Presentation Part1
ASP.Net Presentation Part1Neeraj Mathur
 
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
 
Rest web service_with_spring_hateoas
Rest web service_with_spring_hateoasRest web service_with_spring_hateoas
Rest web service_with_spring_hateoasZeid Hassan
 
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 implementingDoria Hamelryk
 
Asp.Net Page Life
Asp.Net Page LifeAsp.Net Page Life
Asp.Net Page Lifeguest812990
 
ASP.NET 02 - How ASP.NET Works
ASP.NET 02 - How ASP.NET WorksASP.NET 02 - How ASP.NET Works
ASP.NET 02 - How ASP.NET WorksRandy Connolly
 
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
 

Similaire à Aspnetpagelifecycle 101129103702-phpapp02 (20)

Parallelminds.asp.net with sp
Parallelminds.asp.net with spParallelminds.asp.net with sp
Parallelminds.asp.net with sp
 
Aspnet life cycle events
Aspnet life cycle eventsAspnet life cycle events
Aspnet life cycle events
 
Why ASP.NET Development is Important?
Why ASP.NET Development is Important?Why ASP.NET Development is Important?
Why ASP.NET Development is Important?
 
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
 
Web controls
Web controlsWeb controls
Web controls
 
Page life cycle
Page life cyclePage life cycle
Page life cycle
 
Web forms in ASP.net
Web forms in ASP.netWeb forms in ASP.net
Web forms in ASP.net
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NET
 
ASP.Net Presentation Part1
ASP.Net Presentation Part1ASP.Net Presentation Part1
ASP.Net Presentation Part1
 
NET_Training.pptx
NET_Training.pptxNET_Training.pptx
NET_Training.pptx
 
Ajax and ASP.NET AJAX
Ajax and ASP.NET AJAXAjax and ASP.NET AJAX
Ajax and ASP.NET AJAX
 
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
 
Rest web service_with_spring_hateoas
Rest web service_with_spring_hateoasRest web service_with_spring_hateoas
Rest web service_with_spring_hateoas
 
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
 
Asp.Net Page Life
Asp.Net Page LifeAsp.Net Page Life
Asp.Net Page Life
 
ASP.NET Lecture 1
ASP.NET Lecture 1ASP.NET Lecture 1
ASP.NET Lecture 1
 
ASP.NET 02 - How ASP.NET Works
ASP.NET 02 - How ASP.NET WorksASP.NET 02 - How ASP.NET Works
ASP.NET 02 - How ASP.NET Works
 
ASP.NET Lecture 2
ASP.NET Lecture 2ASP.NET Lecture 2
ASP.NET Lecture 2
 
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
 

Dernier

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Dernier (20)

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

Aspnetpagelifecycle 101129103702-phpapp02

  • 1. Presented By : Abhishek Sur http://www.abhisheksur.com/
  • 2. Table of Content  Introduction  Application Life Cycle  IIS Request Process  Application Pool  Worker Process  HTTP Handler/Module  ASP.NET Page Life Cycle  Page Life Cycle Steps  Page Life Cycle Events  Life Cycle for Master Page and User Control  QA
  • 3. Introduction  When Clients request for an aspx page from browser and lot of stuffs happens in background to produce the output or sending response to client. This evolves ASP.NET Page Lifecycle.  ASP.NET Page Life Cycle is very much important to know for each and every developer to developed an ASP.NET Web Application.  All events, data processing, dynamic control creation, view state, postback, rendering etc. are depends with Page Life Cycle.
  • 4. Application Life Cycle 1. Client Request For Information 2. Request comes to Server 3. Server Process the request 4. Send the response back to Client
  • 5. Application Life Cycle - Contd.  Key terms to remember  HTTP.SYS  WAS  Application Pool  Worker Process http://blogs.thesitedoctor.co.uk/tim/2006/06/30/Complete+Lifecycle+Of+A n+ASPNet+Page+And+Controls.aspx
  • 6. Application Life Cycle – Contd.  Key Terms To Remember  Http Module  Http Handler  Http Pipeline
  • 7. End Of Application Life Cycle – Start Page Life Cycle  Request Passes Through HTTP Pipe Line  This Start Page Life Cycle
  • 8. ASP.NET Page Life Cycle Begins  Start  Initialization S I L  Load  Validation R E V  Events  Render
  • 9. Page Life Cycle - Start  Client Request For Resource  Request Comes To Server (IIS)  IIS Process the Initial Processing  Request Passed through HTTP- Pipe Line  ASP.NET Page Life Cycle Starts
  • 10. Page Life Cycle - Initialization  Set Postback properties  Unique ID for Each Control in the Page  Themes needs to be initialized  Dynamic control need to be created
  • 11. Page Life Cycle - Load  If the Request is the post back request then it loads data from View States and Control State
  • 12. Page Life Cycle - Validation  Validate the pages Control  Updates the IsValid property
  • 13. Page Life Cycle - Events  This will only fired if the request is an postback event.  Like, if the post back is happened for an Button Click. Button Click event will fired.
  • 14. Page Life Cycle - Render  Before Rendering All View State data has been set.  Render() method for all control has been called and write the out put on output stream.
  • 15. Page Life Cycle - Events http://msdn.microsoft.com/en-us/library/ms178472.aspx
  • 16. ASP.NET Page Life Cycle Events  PreInit  Init  PreLoad  Load  Control Events  PreRender  SaveViewState  Render  Unload
  • 17. Page Life Cycle – Events  PreInit()  This is the first event which raised in asp.net page lifecycle  Check for Request is for Post Back or not.  All dynamic control need to be created  Theme Change, Master Page Set at runtime  Init()  Raised after all controls have been initialized  Build up a tree of controls from the ASPX file  Turn on view state monitoring – any changes in control will be tracked by View State for future.
  • 18. Page Life Cycle - Events  PreLoad()  Load view state data for page and controls  Load Postback data if needed  We can process any kind operation that need to perform before page load  Load()  OnLoad methods control called for each and every control  We can create the connection initialization for any kind of external source like database connection  We can also set the control properties
  • 19. Page Life Cycle - Events  Control Events  If this is an postback request , Corresponding events will triggered. Like, if the post back is happing for button click, then Button_Click Event will fired.  PreRender  Each control of the page has a PreRender event which is being invoked.  EnsureChildControls is also being called during this events  DataBind method for all control has also been called  If we want to change any thing to any control this is the last event where we can do because after the pageRender starts
  • 20. Page Life Cycle - Events  SaveViewState  ViewState Monitoring is turned off as here all the ViewState Data need to be saved.  View State data saved in hidden filed called _VIEWSTATE  Render  Pages calls the Render method for each and every control.  Text writer that writes the output to the as output stream  Output steam set to the page's Response property.
  • 21. Page Life Cycle - Events  Unload  This is the last event of asp.net page life cycle  This ensure the Request and Response has been set to null.  This is called only after the content of the page fully rendered and response sent to client
  • 22. Page Life Cycle - Master Page and User Controls  MasterPage gets initialized from the Page class in the init phaze of page. The content of Masterpage gets loaded side by side as the page gets loaded.  User control will be initialized and added to the page and before page gets initialized  After page Onload, MasterPage_OnLoad gets called and UserControl_Onload gets called sequentially.  Followed by each of Page events, masterPage events gets called and next Usercontrol events are called.  During the unload phaze, Usercontrol gets unloaded first and then masterpage and Page in sequence.  For further reference refer to : http://blogs.thesitedoctor.co.uk/tim/2006/06/30/Complete+Life cycle+Of+An+ASPNet+Page+And+Controls.aspx
  • 23. Q/A