Please enable Javascript to correctly display the contents on Dot Net Tricks!

Introduction to

  Authors : Shailendra Chauhan
Updated On : 14 Jul 2012
Total Views : 11,309   

According to Microsoft, "ASP.NET is a technology for building powerful, dynamic Web applications and is part of the .NET Framework". Infact Asp.Net is a programming framework used to develop web applications and web services. Basically it is next version of asp. It provides the easy way to build, deploy & run web application on any browser.

Benefits of Asp.Net

  1. Asp.Net makes development simple and easy to maintain with event-driven and server side programming model.

  2. Asp.Net source code is executed on the server. The source code is complied first time the page is requested. The server serves the complied version of the page for use next time the page is requested.

  3. Asp.Net provides validations controls.

  4. The html produced by Asp.Net is sent back to the browser. The application code that we write is not sent back to the browser and is not stolen easily.

  5. In Asp.Net business logic(in .cs class file) and presentation logic(in .aspx file) are in separate files.

Asp .Net Page Life Cycle Events

At each stage of the page life cycle, the page raises some events, which could be coded. An event handler is basically a function or subroutine, bound to the event, using declarative attributes like Onclick or handle. Asp.Net 3.5 & 4.0 page life cycle has following events in sequence :

  1. PreInit

    It is is entry point of page life cycle. It checks IsPostBack property to check or recreate dynamic controls. In this we can set master pages dynamically & set and get profile property values.

  2. Init

    It is is raised after all controls of page are initilised and skin properties are set. It is used to read or initialise control properties.

  3. InitComplete

    This indicates that page is completely initialised.

  4. Preload

    This event is called before loading the page in the RAM(memory). If any processing on a control or on page is required we use it.

  5. Load

    This invokes the onload event of the page. In this we create connection to the database, get/set controls values and get/set view state values.

  6. loadComplete

    This indicates that page is completely loaded into memory.

  7. Prender

    we use this event to make final changes to the controls or page before rendering it to the browser.

  8. SaveStateComplete

    View state of each control is saved before this event occurs. If we want to change the view state of any control then we use this event. This event can not be used to change the other properties of the controls.

  9. Render/PrenderComplete

    This indicates that page is completely rendered to the browser.Before rendering, view state is saved for the page and all controls. During the rendering stage, the page calls the Render method for each control, providing a text writer that writes its output to the OutputStream object of the page's Response property.

  10. Unload

    The Unload event is raised after the page has been fully rendered, sent to the client, and is ready to be discarded. At this point, page properties such as Response and Request are unloaded and cleanup is performed.We can use this event for closing files & database connection. This event occurs for each control.

Free Interview Books
PPC Marketing (offline)

Sat, Sun 09:00 AM-10:30 AM IST

Know More
NodeJS Development (online)

MON-FRI 06:00 AM - 07:30 AM IST

Know More
AngularJS Development (online)

MON-FRI 08:00 PM-09:30 PM IST.

Know More
27 OCT
ASP.NET MVC with AngularJS Development (online)

MON-FRI     07:30 AM-09:00 AM IST

24 OCT
MEAN Stack Development (online)

MON-FRI     06:00 AM -07:30 AM IST

22 OCT
ASP.NET MVC with AngularJS Development (offline)

SAT,SUN     08:00 AM-09:30 AM

12 OCT
ASP.NET MVC with AngularJS Development (online)

Mon-Fri     09:30 PM-11:00 PM IST

17 SEP
ASP.NET MVC with AngularJS Development (offline)

SAT,SUN     05:00 PM-06:30 PM IST

NodeJS Development (offline)

Sat, Sun     11:00 AM-12:30 PM IST


Professional Speaks