SlideShare a Scribd company logo
ASP.NET Page Life Cycle Dev Basics Series Jay Harris
About the Talk Covers Discuss:ASP.NET Page Life CycleProper use of Data Binding Events Involves only ASP.NET EventsNo MVC. No Silverlight.No Controls or DataSource Controls Tips & Tricks. And Traps. Life Cycle Data Binding Tips & Tricks Pain Points Overview What to expect out of this session
About the Speaker Covers Jay HarrisSoftware Consultant.NET Developer Ask Questions Anytime Please Give Feedback!http://www.speakerrate.com/jayharris/ Life Cycle Data Binding Tips & Tricks Pain Points Overview What to expect out of this session
The Agenda Anatomy of the ASP.NET Page Life Cycle
Page Start Agenda System Assigns Properties:RequestResponseUICulture System determines if the request is new or postback Start The Agenda Anatomy of the ASP.NET Page Life Cycle
Page Initialization Agenda System Prepares Controls:Available by UniqueIDProperties set from code/CIF values Applies Theme & MasterPageHandled in PreInit Start Initialization The Agenda Anatomy of the ASP.NET Page Life Cycle
Page Load Agenda If IsPostBack:Restores Properties from State Start Initialization Load The Agenda Anatomy of the ASP.NET Page Life Cycle
Render Agenda Saves ViewState & Renders Start Initialization Load Render The Agenda Anatomy of the ASP.NET Page Life Cycle
Control Validation Agenda If IsPostBack & Validators exist:Runs Validate() for All Validators…even the disabled ones Start Initialization Load   Validation Render The Agenda Anatomy of the ASP.NET Page Life Cycle
PostBack Events Agenda If IsPostBack:Runs any Event Handlers as needed Includes events such as:TextBox.TextChangedDropDownList.SelectedIndexChangedButton.Click Start Initialization Load   Validation   Events Render The Agenda Anatomy of the ASP.NET Page Life Cycle
Easy to Remember Agenda “SILVER!”(as in medals & bars) Start Initialization Load Validation Events Render The Agenda Anatomy of the ASP.NET Page Life Cycle
Easy to Remember Agenda Wait. “SLIVER?!?”(no, not wood) Start Load Initialization Validation Events Render The Agenda Anatomy of the ASP.NET Page Life Cycle
Easy to Remember Agenda Huh? “LIVER?!?”(eww. gross. and there’s no onions) Start Load Initialization Validation Events Render The Agenda Anatomy of the ASP.NET Page Life Cycle
Easy to Remember Agenda “Hi-yo, Silver, away!”(The Lone Ranger) Start Initialization Load Validation Events Render The Agenda Anatomy of the ASP.NET Page Life Cycle
Running the Show Harnessing the ASP.NET Page Life Cycle*
Running the Show Subjected to the terms, limitations, availability, whims, will, desires, rules, patterns, provisions, agreements, covenants, conditions, assigns, successors, and approval of the ASP.NET worker process. Harnessing the ASP.NET Page Life Cycle*
Debugging Events Features Tracing   Page-Level Page-Level Tracing: <%@ Page Trace=“true” %> Running the Show Harnessing the ASP.NET Page Life Cycle*
Debugging Events Features Tracing*   Page-Level* Page-Level Tracing: <%@ Page Trace=“true” %> *Not available after Render Running the Show Subjected to the terms, limitations, availability, whims, will, desires, rules, patterns, provisions, agreements, covenants, conditions, assigns, successors, and approval of the ASP.NET worker process. Harnessing the ASP.NET Page Life Cycle*
Debugging Events Features Tracing*   Page-Level*   App-Level Application-Level Tracing: <configuration><system.web>    <trace enabled=“true” />  </system.web></configuration> Running the Show Harnessing the ASP.NET Page Life Cycle*
Debugging Events Features Tracing*   Page-Level*   App-Level* Application-Level Tracing: <configuration>  <system.web>    <trace enabled=“true” />  </system.web></configuration> *Site-Wide Performance Hit Running the Show Subjected to the terms, limitations, availability, whims, will, desires, rules, patterns, provisions, agreements, covenants, conditions, assigns, successors, and approval of the ASP.NET worker process. Harnessing the ASP.NET Page Life Cycle*
Event Wiring Features Tracing* Wiring   Manual Using the Constructor: public MyPage(){this.Load += PageLoad;}protected void PageLoad(…) Running the Show Harnessing the ASP.NET Page Life Cycle*
Event Wiring Features Tracing* Wiring*   Manual* Using the Constructor: public MyPage(){this.Load += PageLoad;}protected void PageLoad(…) *Wire Control events in Page Init Running the Show Subjected to the terms, limitations, availability, whims, will, desires, rules, patterns, provisions, agreements, covenants, conditions, assigns, successors, and approval of the ASP.NET worker process. Harnessing the ASP.NET Page Life Cycle*
Event Wiring, Auto Features Tracing* Wiring*   Manual*   Auto-Wire Auto-Wire via Page_EventName: protected void Page_Load(…){    //Do some stuff} Running the Show Harnessing the ASP.NET Page Life Cycle*
Event Wiring, Auto Features Tracing* Wiring*   Manual*   Auto-Wire* Auto-Wire via Page_EventName: protected void Page_Load(…){    //Do some stuff} *Page only. Not for controls.*Performance Hit. Running the Show Subjected to the terms, limitations, availability, whims, will, desires, rules, patterns, provisions, agreements, covenants, conditions, assigns, successors, and approval of the ASP.NET worker process. Harnessing the ASP.NET Page Life Cycle*
Event Execution Features Tracing* Wiring* Execution 	Tree Top-Down Control Tree Execution First load the Page…then load the Container Control…then load the Child Control Running the Show Harnessing the ASP.NET Page Life Cycle*
Event Execution Features Tracing* Wiring* Execution* 	Tree* Top-Down Control Tree Execution First load the Page…then load the Container Control…then load the Child Control *Except: Initialization & Unload First unload Controls, then the Page Running the Show Subjected to the terms, limitations, availability, whims, will, desires, rules, patterns, provisions, agreements, covenants, conditions, assigns, successors, and approval of the ASP.NET worker process. Harnessing the ASP.NET Page Life Cycle*
Event Execution Features Tracing* Wiring* Execution* 	Tree* 	Collection Index-based Collection Execution page.Controls[0].OnLoadpage.Controls[1].OnLoadpage.Controls[2].OnLoad…page.Controls[n].OnLoad Running the Show Harnessing the ASP.NET Page Life Cycle*
Event Execution Features Tracing* Wiring* Execution* 	Tree* 	Collection* Index-based Collection Execution page.Controls[0].OnLoadpage.Controls[1].OnLoadpage.Controls[2].OnLoad…page.Controls[n].OnLoad * When was it added to Controls? Running the Show Subjected to the terms, limitations, availability, whims, will, desires, rules, patterns, provisions, agreements, covenants, conditions, assigns, successors, and approval of the ASP.NET worker process. Harnessing the ASP.NET Page Life Cycle*
Event Execution Features Tracing* Wiring* Execution* 	Tree* 	Collection* Index-based Collection Execution page.Controls[0].OnLoadpage.Controls[1].OnLoadpage.Controls[2].OnLoad…page.Controls[n].OnLoad * When was it added to Controls? Running the Show Subjected to the terms, limitations, availability, whims, will, desires, rules, patterns, provisions, agreements, covenants, conditions, assigns, successors, and approval of the ASP.NET worker process. Harnessing the ASP.NET Page Life Cycle*
Loading ViewState Features Tracing* Wiring* Execution* ViewState Control State is loaded twice Once immediately prior to LoadOnce immediately following Load Running the Show Harnessing the ASP.NET Page Life Cycle*
Loading ViewState Features Tracing* Wiring* Execution* ViewState* Control State is loaded twice Once immediately prior to LoadOnce immediately following Load *Not restored if modified prior Running the Show Subjected to the terms, limitations, availability, whims, will, desires, rules, patterns, provisions, agreements, covenants, conditions, assigns, successors, and approval of the ASP.NET worker process. Harnessing the ASP.NET Page Life Cycle*
Displaying Data Effectively Binding Dynamic Data to the Page
DataBind(); Data Control.DataBind();Only for the specific contoland its child controls Page.DataBind();Binds all controls on the page DataBind();  Displaying Data Effectively Binding Dynamic Data to the Page
Binding Events Data DataBindingBegins DataBinding of a control DataBind(); EventsDataBinding Displaying Data Effectively Binding Dynamic Data to the Page
Binding Events Data RowCreated / ItemCreatedManipulating item markupCannot be dependent on control data Row vs. Item Usage:RowCreated: GridViewItemCreated: DataGrid,ListView, Repeater, and everything else. DataBind(); EventsDataBindingRwCreated Displaying Data Effectively Binding Dynamic Data to the Page
Binding Events Data RowDataBound / ItemDataBoundManipulating item dataData is available within controls Row vs. Item Usage:RowCreated: GridViewItemCreated: DataGrid, ListView, Repeater, and everything else. DataBind(); EventsDataBindingRwCreatedRwDBound Displaying Data Effectively Binding Dynamic Data to the Page
Resources & Questions ResourcesMSDN:	http://tinyurl.com/AspNetPageLifeCycleBlog:	http://www.cptloadtest.comEmail:	jayharris@harrisdesigns.comTwitter:	@jayharris Questions? Wrap-up Taking the Next Steps with the ASP.NET Page Life Cycle
Thank You Jay Harris OnlineBlog:	http://www.cptloadtest.comEmail:	jayharris@harrisdesigns.comTwitter:	@jayharris FeedbackRate:	http://www.speakerrate.com/jayharris Wrap-up Taking the Next Steps with the ASP.NET Page Life Cycle

More Related Content

What's hot

Asp.net life cycle
Asp.net life cycleAsp.net life cycle
Asp.net life cycle
Irfaan Khan
 
ASP.NET - Life cycle of asp
ASP.NET - Life cycle of aspASP.NET - Life cycle of asp
ASP.NET - Life cycle of asp
priya Nithya
 
Aspnet Life Cycles Events
Aspnet Life Cycles EventsAspnet Life Cycles Events
Aspnet Life Cycles EventsLiquidHub
 
Asp.net control
Asp.net controlAsp.net control
Asp.net control
Paneliya Prince
 
Parallelminds.asp.net with sp
Parallelminds.asp.net with spParallelminds.asp.net with sp
Parallelminds.asp.net with sp
parallelminder
 
Offline First with Service Worker
Offline First with Service WorkerOffline First with Service Worker
Offline First with Service Worker
Muhammad Samu
 
Progressive Web Apps 101
Progressive Web Apps 101Progressive Web Apps 101
Progressive Web Apps 101
Muhammad Samu
 
Building Offline Ready and Installable Web App
Building Offline Ready and Installable Web AppBuilding Offline Ready and Installable Web App
Building Offline Ready and Installable Web App
Muhammad Samu
 
Page life cycle
Page life cyclePage life cycle
Page life cycle
AsamHussain3
 
Service Worker - Reliability bits
Service Worker - Reliability bitsService Worker - Reliability bits
Service Worker - Reliability bits
jungkees
 
Building React CRUD app in minutes?
Building React CRUD app in minutes?Building React CRUD app in minutes?
Building React CRUD app in minutes?
Tomasz Bak
 
Service worker API
Service worker APIService worker API
Service worker API
Giorgio Natili
 
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
Rob Tweed
 
Introduction to react
Introduction to reactIntroduction to react
Introduction to react
kiranabburi
 
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
Chris Love
 
Service workers
Service workersService workers
Service workers
Pavel Zhytko
 
Understanding Facebook's React.js
Understanding Facebook's React.jsUnderstanding Facebook's React.js
Understanding Facebook's React.js
Federico Torre
 
Service workers
Service workersService workers
Service workers
jungkees
 

What's hot (18)

Asp.net life cycle
Asp.net life cycleAsp.net life cycle
Asp.net life cycle
 
ASP.NET - Life cycle of asp
ASP.NET - Life cycle of aspASP.NET - Life cycle of asp
ASP.NET - Life cycle of asp
 
Aspnet Life Cycles Events
Aspnet Life Cycles EventsAspnet Life Cycles Events
Aspnet Life Cycles Events
 
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
 
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
 
Building Offline Ready and Installable Web App
Building Offline Ready and Installable Web AppBuilding Offline Ready and Installable Web App
Building Offline Ready and Installable Web App
 
Page life cycle
Page life cyclePage life cycle
Page life cycle
 
Service Worker - Reliability bits
Service Worker - Reliability bitsService Worker - Reliability bits
Service Worker - Reliability bits
 
Building React CRUD app in minutes?
Building React CRUD app in minutes?Building React CRUD app in minutes?
Building React CRUD app in minutes?
 
Service worker API
Service worker APIService worker API
Service worker API
 
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
 
Introduction to react
Introduction to reactIntroduction to react
Introduction to react
 
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
 
Service workers
Service workersService workers
Service workers
 
Understanding Facebook's React.js
Understanding Facebook's React.jsUnderstanding Facebook's React.js
Understanding Facebook's React.js
 
Service workers
Service workersService workers
Service workers
 

Similar to Dev Basics: The ASP.NET Page Life Cycle

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
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NET
Peter Gfader
 
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
 
Rest web service_with_spring_hateoas
Rest web service_with_spring_hateoasRest web service_with_spring_hateoas
Rest web service_with_spring_hateoas
Zeid Hassan
 
Life cycle of web page
Life cycle of web pageLife cycle of web page
Life cycle of web page
university of Gujrat, pakistan
 
Harish Understanding Aspnet
Harish Understanding AspnetHarish Understanding Aspnet
Harish Understanding Aspnetrsnarayanan
 
Web performance testing
Web performance testingWeb performance testing
Web performance testing
Patrick Meenan
 
CTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVCCTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVC
Barry Gervin
 
NET_Training.pptx
NET_Training.pptxNET_Training.pptx
NET_Training.pptx
ssuserc28c7c1
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
Mayank Srivastava
 
ForwardJS 2017 - Fullstack end-to-end Test Automation with node.js
ForwardJS 2017 -  Fullstack end-to-end Test Automation with node.jsForwardJS 2017 -  Fullstack end-to-end Test Automation with node.js
ForwardJS 2017 - Fullstack end-to-end Test Automation with node.js
Mek Srunyu Stittri
 
An introduction to Vue.js
An introduction to Vue.jsAn introduction to Vue.js
An introduction to Vue.js
Javier Lafora Rey
 
Let's react - Meetup
Let's react - MeetupLet's react - Meetup
Let's react - Meetup
RAJNISH KATHAROTIYA
 
As pnet pagelife_usha
As pnet pagelife_ushaAs pnet pagelife_usha
As pnet pagelife_usha
Rajalaxmi Pattanaik
 
Spring MVC 5 & Hibernate 5 Integration
Spring MVC 5 & Hibernate 5 IntegrationSpring MVC 5 & Hibernate 5 Integration
Spring MVC 5 & Hibernate 5 Integration
Majurageerthan Arumugathasan
 
ASP.Net Presentation Part1
ASP.Net Presentation Part1ASP.Net Presentation Part1
ASP.Net Presentation Part1Neeraj Mathur
 
Parkjihoon phonegap research_for_bada
Parkjihoon phonegap research_for_badaParkjihoon phonegap research_for_bada
Parkjihoon phonegap research_for_bada웹데브모바일
 
Server Controls of ASP.Net
Server Controls of ASP.NetServer Controls of ASP.Net
Server Controls of ASP.Net
Hitesh Santani
 

Similar to Dev Basics: The ASP.NET Page Life Cycle (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?
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NET
 
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
 
Walther Ajax4
Walther Ajax4Walther Ajax4
Walther Ajax4
 
Rest web service_with_spring_hateoas
Rest web service_with_spring_hateoasRest web service_with_spring_hateoas
Rest web service_with_spring_hateoas
 
Life cycle of web page
Life cycle of web pageLife cycle of web page
Life cycle of web page
 
Harish Understanding Aspnet
Harish Understanding AspnetHarish Understanding Aspnet
Harish Understanding Aspnet
 
Web performance testing
Web performance testingWeb performance testing
Web performance testing
 
CTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVCCTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVC
 
NET_Training.pptx
NET_Training.pptxNET_Training.pptx
NET_Training.pptx
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
ForwardJS 2017 - Fullstack end-to-end Test Automation with node.js
ForwardJS 2017 -  Fullstack end-to-end Test Automation with node.jsForwardJS 2017 -  Fullstack end-to-end Test Automation with node.js
ForwardJS 2017 - Fullstack end-to-end Test Automation with node.js
 
An introduction to Vue.js
An introduction to Vue.jsAn introduction to Vue.js
An introduction to Vue.js
 
Let's react - Meetup
Let's react - MeetupLet's react - Meetup
Let's react - Meetup
 
As pnet pagelife_usha
As pnet pagelife_ushaAs pnet pagelife_usha
As pnet pagelife_usha
 
Spring MVC 5 & Hibernate 5 Integration
Spring MVC 5 & Hibernate 5 IntegrationSpring MVC 5 & Hibernate 5 Integration
Spring MVC 5 & Hibernate 5 Integration
 
ASP.Net Presentation Part1
ASP.Net Presentation Part1ASP.Net Presentation Part1
ASP.Net Presentation Part1
 
Parkjihoon phonegap research_for_bada
Parkjihoon phonegap research_for_badaParkjihoon phonegap research_for_bada
Parkjihoon phonegap research_for_bada
 
Server Controls of ASP.Net
Server Controls of ASP.NetServer Controls of ASP.Net
Server Controls of ASP.Net
 

More from Jay Harris

Bullets Kill People: Building Effective Presentations
Bullets Kill People: Building Effective PresentationsBullets Kill People: Building Effective Presentations
Bullets Kill People: Building Effective Presentations
Jay Harris
 
Dethroning Grunt: Simple and Effective Builds with gulp.js
Dethroning Grunt: Simple and Effective Builds with gulp.jsDethroning Grunt: Simple and Effective Builds with gulp.js
Dethroning Grunt: Simple and Effective Builds with gulp.js
Jay Harris
 
OrchardCMS module development
OrchardCMS module developmentOrchardCMS module development
OrchardCMS module development
Jay Harris
 
Test driven node.js
Test driven node.jsTest driven node.js
Test driven node.js
Jay Harris
 
node.js Module Development
node.js Module Developmentnode.js Module Development
node.js Module Development
Jay Harris
 
The Geek's Guide to SEO
The Geek's Guide to SEOThe Geek's Guide to SEO
The Geek's Guide to SEO
Jay Harris
 
Going for Speed: Testing for Performance
Going for Speed: Testing for PerformanceGoing for Speed: Testing for Performance
Going for Speed: Testing for Performance
Jay Harris
 

More from Jay Harris (7)

Bullets Kill People: Building Effective Presentations
Bullets Kill People: Building Effective PresentationsBullets Kill People: Building Effective Presentations
Bullets Kill People: Building Effective Presentations
 
Dethroning Grunt: Simple and Effective Builds with gulp.js
Dethroning Grunt: Simple and Effective Builds with gulp.jsDethroning Grunt: Simple and Effective Builds with gulp.js
Dethroning Grunt: Simple and Effective Builds with gulp.js
 
OrchardCMS module development
OrchardCMS module developmentOrchardCMS module development
OrchardCMS module development
 
Test driven node.js
Test driven node.jsTest driven node.js
Test driven node.js
 
node.js Module Development
node.js Module Developmentnode.js Module Development
node.js Module Development
 
The Geek's Guide to SEO
The Geek's Guide to SEOThe Geek's Guide to SEO
The Geek's Guide to SEO
 
Going for Speed: Testing for Performance
Going for Speed: Testing for PerformanceGoing for Speed: Testing for Performance
Going for Speed: Testing for Performance
 

Recently uploaded

Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 

Recently uploaded (20)

Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 

Dev Basics: The ASP.NET Page Life Cycle

  • 1. ASP.NET Page Life Cycle Dev Basics Series Jay Harris
  • 2. About the Talk Covers Discuss:ASP.NET Page Life CycleProper use of Data Binding Events Involves only ASP.NET EventsNo MVC. No Silverlight.No Controls or DataSource Controls Tips & Tricks. And Traps. Life Cycle Data Binding Tips & Tricks Pain Points Overview What to expect out of this session
  • 3. About the Speaker Covers Jay HarrisSoftware Consultant.NET Developer Ask Questions Anytime Please Give Feedback!http://www.speakerrate.com/jayharris/ Life Cycle Data Binding Tips & Tricks Pain Points Overview What to expect out of this session
  • 4. The Agenda Anatomy of the ASP.NET Page Life Cycle
  • 5. Page Start Agenda System Assigns Properties:RequestResponseUICulture System determines if the request is new or postback Start The Agenda Anatomy of the ASP.NET Page Life Cycle
  • 6. Page Initialization Agenda System Prepares Controls:Available by UniqueIDProperties set from code/CIF values Applies Theme & MasterPageHandled in PreInit Start Initialization The Agenda Anatomy of the ASP.NET Page Life Cycle
  • 7. Page Load Agenda If IsPostBack:Restores Properties from State Start Initialization Load The Agenda Anatomy of the ASP.NET Page Life Cycle
  • 8. Render Agenda Saves ViewState & Renders Start Initialization Load Render The Agenda Anatomy of the ASP.NET Page Life Cycle
  • 9. Control Validation Agenda If IsPostBack & Validators exist:Runs Validate() for All Validators…even the disabled ones Start Initialization Load Validation Render The Agenda Anatomy of the ASP.NET Page Life Cycle
  • 10. PostBack Events Agenda If IsPostBack:Runs any Event Handlers as needed Includes events such as:TextBox.TextChangedDropDownList.SelectedIndexChangedButton.Click Start Initialization Load Validation Events Render The Agenda Anatomy of the ASP.NET Page Life Cycle
  • 11. Easy to Remember Agenda “SILVER!”(as in medals & bars) Start Initialization Load Validation Events Render The Agenda Anatomy of the ASP.NET Page Life Cycle
  • 12. Easy to Remember Agenda Wait. “SLIVER?!?”(no, not wood) Start Load Initialization Validation Events Render The Agenda Anatomy of the ASP.NET Page Life Cycle
  • 13. Easy to Remember Agenda Huh? “LIVER?!?”(eww. gross. and there’s no onions) Start Load Initialization Validation Events Render The Agenda Anatomy of the ASP.NET Page Life Cycle
  • 14. Easy to Remember Agenda “Hi-yo, Silver, away!”(The Lone Ranger) Start Initialization Load Validation Events Render The Agenda Anatomy of the ASP.NET Page Life Cycle
  • 15. Running the Show Harnessing the ASP.NET Page Life Cycle*
  • 16. Running the Show Subjected to the terms, limitations, availability, whims, will, desires, rules, patterns, provisions, agreements, covenants, conditions, assigns, successors, and approval of the ASP.NET worker process. Harnessing the ASP.NET Page Life Cycle*
  • 17. Debugging Events Features Tracing Page-Level Page-Level Tracing: <%@ Page Trace=“true” %> Running the Show Harnessing the ASP.NET Page Life Cycle*
  • 18. Debugging Events Features Tracing* Page-Level* Page-Level Tracing: <%@ Page Trace=“true” %> *Not available after Render Running the Show Subjected to the terms, limitations, availability, whims, will, desires, rules, patterns, provisions, agreements, covenants, conditions, assigns, successors, and approval of the ASP.NET worker process. Harnessing the ASP.NET Page Life Cycle*
  • 19. Debugging Events Features Tracing* Page-Level* App-Level Application-Level Tracing: <configuration><system.web> <trace enabled=“true” /> </system.web></configuration> Running the Show Harnessing the ASP.NET Page Life Cycle*
  • 20. Debugging Events Features Tracing* Page-Level* App-Level* Application-Level Tracing: <configuration> <system.web> <trace enabled=“true” /> </system.web></configuration> *Site-Wide Performance Hit Running the Show Subjected to the terms, limitations, availability, whims, will, desires, rules, patterns, provisions, agreements, covenants, conditions, assigns, successors, and approval of the ASP.NET worker process. Harnessing the ASP.NET Page Life Cycle*
  • 21. Event Wiring Features Tracing* Wiring Manual Using the Constructor: public MyPage(){this.Load += PageLoad;}protected void PageLoad(…) Running the Show Harnessing the ASP.NET Page Life Cycle*
  • 22. Event Wiring Features Tracing* Wiring* Manual* Using the Constructor: public MyPage(){this.Load += PageLoad;}protected void PageLoad(…) *Wire Control events in Page Init Running the Show Subjected to the terms, limitations, availability, whims, will, desires, rules, patterns, provisions, agreements, covenants, conditions, assigns, successors, and approval of the ASP.NET worker process. Harnessing the ASP.NET Page Life Cycle*
  • 23. Event Wiring, Auto Features Tracing* Wiring* Manual* Auto-Wire Auto-Wire via Page_EventName: protected void Page_Load(…){ //Do some stuff} Running the Show Harnessing the ASP.NET Page Life Cycle*
  • 24. Event Wiring, Auto Features Tracing* Wiring* Manual* Auto-Wire* Auto-Wire via Page_EventName: protected void Page_Load(…){ //Do some stuff} *Page only. Not for controls.*Performance Hit. Running the Show Subjected to the terms, limitations, availability, whims, will, desires, rules, patterns, provisions, agreements, covenants, conditions, assigns, successors, and approval of the ASP.NET worker process. Harnessing the ASP.NET Page Life Cycle*
  • 25. Event Execution Features Tracing* Wiring* Execution Tree Top-Down Control Tree Execution First load the Page…then load the Container Control…then load the Child Control Running the Show Harnessing the ASP.NET Page Life Cycle*
  • 26. Event Execution Features Tracing* Wiring* Execution* Tree* Top-Down Control Tree Execution First load the Page…then load the Container Control…then load the Child Control *Except: Initialization & Unload First unload Controls, then the Page Running the Show Subjected to the terms, limitations, availability, whims, will, desires, rules, patterns, provisions, agreements, covenants, conditions, assigns, successors, and approval of the ASP.NET worker process. Harnessing the ASP.NET Page Life Cycle*
  • 27. Event Execution Features Tracing* Wiring* Execution* Tree* Collection Index-based Collection Execution page.Controls[0].OnLoadpage.Controls[1].OnLoadpage.Controls[2].OnLoad…page.Controls[n].OnLoad Running the Show Harnessing the ASP.NET Page Life Cycle*
  • 28. Event Execution Features Tracing* Wiring* Execution* Tree* Collection* Index-based Collection Execution page.Controls[0].OnLoadpage.Controls[1].OnLoadpage.Controls[2].OnLoad…page.Controls[n].OnLoad * When was it added to Controls? Running the Show Subjected to the terms, limitations, availability, whims, will, desires, rules, patterns, provisions, agreements, covenants, conditions, assigns, successors, and approval of the ASP.NET worker process. Harnessing the ASP.NET Page Life Cycle*
  • 29. Event Execution Features Tracing* Wiring* Execution* Tree* Collection* Index-based Collection Execution page.Controls[0].OnLoadpage.Controls[1].OnLoadpage.Controls[2].OnLoad…page.Controls[n].OnLoad * When was it added to Controls? Running the Show Subjected to the terms, limitations, availability, whims, will, desires, rules, patterns, provisions, agreements, covenants, conditions, assigns, successors, and approval of the ASP.NET worker process. Harnessing the ASP.NET Page Life Cycle*
  • 30. Loading ViewState Features Tracing* Wiring* Execution* ViewState Control State is loaded twice Once immediately prior to LoadOnce immediately following Load Running the Show Harnessing the ASP.NET Page Life Cycle*
  • 31. Loading ViewState Features Tracing* Wiring* Execution* ViewState* Control State is loaded twice Once immediately prior to LoadOnce immediately following Load *Not restored if modified prior Running the Show Subjected to the terms, limitations, availability, whims, will, desires, rules, patterns, provisions, agreements, covenants, conditions, assigns, successors, and approval of the ASP.NET worker process. Harnessing the ASP.NET Page Life Cycle*
  • 32. Displaying Data Effectively Binding Dynamic Data to the Page
  • 33. DataBind(); Data Control.DataBind();Only for the specific contoland its child controls Page.DataBind();Binds all controls on the page DataBind(); Displaying Data Effectively Binding Dynamic Data to the Page
  • 34. Binding Events Data DataBindingBegins DataBinding of a control DataBind(); EventsDataBinding Displaying Data Effectively Binding Dynamic Data to the Page
  • 35. Binding Events Data RowCreated / ItemCreatedManipulating item markupCannot be dependent on control data Row vs. Item Usage:RowCreated: GridViewItemCreated: DataGrid,ListView, Repeater, and everything else. DataBind(); EventsDataBindingRwCreated Displaying Data Effectively Binding Dynamic Data to the Page
  • 36. Binding Events Data RowDataBound / ItemDataBoundManipulating item dataData is available within controls Row vs. Item Usage:RowCreated: GridViewItemCreated: DataGrid, ListView, Repeater, and everything else. DataBind(); EventsDataBindingRwCreatedRwDBound Displaying Data Effectively Binding Dynamic Data to the Page
  • 37. Resources & Questions ResourcesMSDN: http://tinyurl.com/AspNetPageLifeCycleBlog: http://www.cptloadtest.comEmail: jayharris@harrisdesigns.comTwitter: @jayharris Questions? Wrap-up Taking the Next Steps with the ASP.NET Page Life Cycle
  • 38. Thank You Jay Harris OnlineBlog: http://www.cptloadtest.comEmail: jayharris@harrisdesigns.comTwitter: @jayharris FeedbackRate: http://www.speakerrate.com/jayharris Wrap-up Taking the Next Steps with the ASP.NET Page Life Cycle