Friday, 7 December 2012

Introduction to ASP.NET

ASP.NET is the next version of Active Server Pages. It provides unified web development model that includes the services neceesary for developers to build enterprise-class web applications. As ASP.NET syntax is compatible with ASP, it also provides a new programming model. ASP.NET is a compiled, and .NET-based environment, we can author applications in any .NET compatible language including Visual Basic .NET, C#, and JScript .NET. Developers can use Web Forms or XML Web services when creating an ASP.NET application. ASP.NET provides a simple model that enables Web developers to write logic that runs at the application level. Developers can write this code in the Global.asax text file or in a compiled class deployed as an assembly. This logic can include application-level events, but developers can easily extend this model to suit the needs of their Web application. For more information, see ASP.NET Applications.

ASP.NET page life cycle:

When ASP.NET page runs, the page goes through a life cycle in which it performs series of steps. It is important for us to understand the page life cycle so that we can write code at the appropriate life-cycle stage for the effect that we intend. The life cycle of a control is based on the page life cycle, and the page raises many of the events that we need to handle in a custom 
control. It includes various stages like:

  1. Page Request: It occurs before the page life cycle begins.
  2. Start: In the start stage, page properties such as response and request are set.  
  3. Initialization: During page initialization, controls on the page are available and each   control's UniqueID property is set.
  4. Load: During load, if the current request is a postback, control properties are loaded with information recovered from view state and control state.
  5.  Unload: The Unload event is raised after the page has been fully rendered, sent to the client, and is ready to be discarded.











No comments:

Post a Comment