Programming Examples

Are you a Programmer or Application Developer or a DBA? Take a cup of coffee, sit back and spend few minutes here :)

Tag Archive for ‘Page_Init’

ASP 4.0 – Understanding Page Events | Lab #003

Step 5 - Start Debug and Observe the Output

In ASP.Net, the client browser will make a request to get a web page. After displaying the page, user can do further navigation via the displayed webpage. In the server side, the server will raise multiple events during the life cycle of a web page. Some of the page events are below:

Page Init: This stage Initializes the page with controls. If any theme needs to be applied, it will be applied here in this phase.

Load: This stage loads the web page with all the controls. In case of post-back, web server will set control properites from the view state. We will learn more about view state in some other article.

Validate: Uses Validator Control and runs validation.

Event Handle: Runs the post-back events. Note, in web application the event happens on the clients browser and its event routines will run on the server at later stage. For Example, let us say a browsing user triggers the text_changed event on the browser end. The event handler routine for the text_changed will run on the server when the user submites text field containing Web-Form or if a post-back occurred. We will learn about post back later.

Render: In this stage, rendering the page for the web -browser occurs. It is a dynamic html generation stage.

Unload: This stage denotes the unloading of the page from the Server memory. After this stage the page becomes no more.

Continue Reading →