Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: ASP.NET .NET The ASP.NET Page Life Cycle Tutorial

This article describes the life cycle of an ASP.NET page from initialization to unloading. Also shows the various methods to override ASP.NET server-side events. Source code available for download.

Tutorial Details:

ASP.NET .NET The ASP.NET Page Life Cycle Tutorial
When a page request is sent to the Web server, whether through a submission or location change, the page is run through a series of events during its creation and disposal. When we try to build ASP.NET pages and this execution cycle is not taken into account, we can cause a lot of headaches for ourselves. However, when used and manipulated correctly, a page's execution cycle can be an effective and powerful tool. Many developers are realizing that understanding what happens and when it happens is crucial to effectively writing ASP.NET pages or user controls.

1. Object Initialization
A page's controls (and the page itself) are first initialized in their raw form. By declaring your objects within the constructor of your C# code-behind file the page knows what types of objects and how many to create. Once you have declared your objects within your constructor, you may then access them from any sub class, method, event, or property. However, if any of your objects are controls specified within your ASPX file, at this point the controls have no attributes or properties.

2. Load Viewstate Data
After the Init event, controls can be referenced using their IDs only (no DOM is established yet for relative references). At LoadViewState event, the initialized controls receive their first properties: viewstate information that was persisted back to the server on the last submission. The page viewstate is managed by ASP.NET and is used to persist information over a page roundtrip to the server. Viewstate information is saved as a string of name/value pairs and contains information such as control text or value. As you can see, this is a giant leap forward from the old ASP 3.0 techniques of maintaining state.


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
ASP.NET .NET The ASP.NET Page Life Cycle Tutorial

View Tutorial:
ASP.NET .NET The ASP.NET Page Life Cycle Tutorial

Related Tutorials:

JavaWorld - Net News Central
JavaWorld - Net News Central
 
Alternative deployment methods, Part 1: Beyond applets - JavaWorld May 2000
Alternative deployment methods, Part 1: Beyond applets - JavaWorld May 2000
 
Is WSDL the indispensable API?
Is WSDL the indispensable API?
 
Rumble in the jungle: J2EE versus .Net, Part 1
Rumble in the jungle: J2EE versus .Net, Part 1
 
Eclipse casts shadows
Eclipse casts shadows
 
A first look at JavaServer Faces, Part I
A first look at JavaServer Faces, Part Learn how to implement Web-based user interfaces with JSF
 
Introducing the Portlet Specification, Part 1
Introducing the Get your feet wet with the specification's underlying terms and concepts
 
nexB - IT assets and applications autodiscovery and management
Open By Design The nexB vision is to build business applications that are Open by Design(tm). Open by Design means that the design for business applications is as open as the source code. In fact, all phases of software development need to be open from d
 
IberAgents
Introduction IberAgents is a web application framework that enables the creation of SOAP-interoperable components in Java, with life cycle management and remote configuration. Development started in 2001; we now have a mature, solid open-source platform
 
Jeff Schmitt's JDBC Page
This tutorial assumes you are using the MySQL database and the GWE JDBC drivers. The host computer is triton.towson.edu.
 
Overview of Servlets and JSP
Servlets are Java technology's answer to CGI programming. They are programs that run on a Web server and build Web pages. Building Web pages on the fly is useful (and commonly done) for a number of reasons.
 
Servlets and JavaServer Pages (JSP) : A Tutorial
An excellent tutorial on JSP and Servlets.
 
Calling JavaBeans from a JSP Page
We will be using this SimpleBean class in this tutorial, so if you haven't read above article then I suggest you do it now.
 
Welcome to the Apache Struts Tutorial
This is the complete Struts Tutorial. Explains ActionForm Action Class Validation Framework.
 
Mock Objects in Unit Tests
EasyMock is a well-known mock tool that can create a mock object for a given interface at runtime.
 
Domain Registration Guide
Domain Registration Guide Domain Registration Guide What is Domain? Internet is the large network of computers. On the Internet there should be some way to identify the computers. Domain name is the solution for this. Domain Name is the unique
 
Open Source Web Frameworks in Java
Open Source Web Frameworks in Java Open Source Web Frameworks in Java Struts Struts Frame work is the implementation of Model-View-Controller (MVC) design pattern for the JSP. Struts is maintained as a part of Apache Jakarta project and is open
 
What is WAP? Detailed discussion of WAP API with examples.
What is WAP? Detailed discussion of WAP API with examples. Learn WAP in 60 minutes W ireless Application Protocol or WAP for short, allows the developers to develop next generation web application for cellular devices. Through WAP enabled mobile
 
SDE for Eclipse
[[http://www.visual-paradigm.com/sdeec.php][The SDE 2.0 for Eclipse (SDE-EC)]] is a powerful, yet the most easy-to-use UML Modelling plugin for Eclipse.
 
Comparing J2ME Multimedia Options
This article presents the latest developments in MMAPI: the new security considerations raised in MMAPI 1.1, the differences between MMAPI and the MIDP 2.0 Media API, J2ME Wireless Toolkit 2.2 support for MMAPI, and JSR 234, Advanced Multimedia Supplement
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.