.Net Framework - Quick Reference Guide

The .Net Framework E-Book by the .Net Interview Cracker is a very useful resource for developers and serves well as a quick reference guide. This E-Book prepares them for technical interviews in Microsoft .Net Framework..

.Net Framework EBook for Technical Interviews

The list of topics included in the very first edition of the E-Book is as given below:
  • What is .NET Framework?
  • Explain the architecture of .Net Framework
  • Common Language Runtime (CLR)
  • Features of the Common Language Runtime
  • Dynamic Language Runtime
  • Common Language Infrastructure (CLI)
  • What is Intermediate Language (IL)?
  • How is a C# program compiled to a processor specific native code?
  • Explain the services provided by the .Net Framework
  • Assembly
  • Properties of an Assembly
  • Components of an Assembly
  • What is an Assembly Manifest?
  • Functions of the Assembly Manifest
  • Contents of the Assembly Manifest
  • Differentiate between Single-file assembly and Multifile assembly
  • What are the different types of assemblies in .NET
  • Friend Assemblies
  • Differentiate between Static and Dynamic Assemblies
  • Hub-and-Spoke model & Satellite Assemblies
  • What is DLL Hell?
  • Application Domains
  • Garbage Collection
  • Garbage Collection in detail
  • Conditions for a garbage collection
  • Benefits provided by Garbage Collection
  • Is the execution of the Garbage Collector non-deterministic? If yes, why?
  • How can you instruct the garbage collector to collect unreferenced data?
  • How can you force Garbage Collection?
  • Global Assembly Cache (GAC)
  • Mention the demerits of installation of an assembly in the GAC
  • Mention the benefits of installation of an assembly in the GAC
  • Mention the ways to deploy an assembly into the GAC
  • Where is the GAC located?
  • Enumerate the Steps for creating a Shared Assembly
The .Net Framework E-Book is now available for sale.


Details of the EBook
Name: .Net Framework - Quick Reference Guide
Author: Chandan Sinha
Format: PDF
Language: English

Price: $2.99 (Exclusively on this website)

(Limited Period Offer - Rates slashed from $3.99 to $2.99)
Focus Area: Technical Interview in Microsoft .Net

.Net Framework - Quick Reference Guide [Kindle Edition]

Ebook Link on Amazon Kindle - http://www.amazon.in/gp/product/B00KKD2PPA

ASP.NET Page Life Cycle

When an ASP.NET application is executed, the web page goes through a life cycle in which it performs a series of processing steps. When a web page is requested, it is loaded into the Web Server memory, processed and sent to the web browser. Then it (the object) is unloaded from the memory. At each of these steps, methods and events are available, ready to be overridden according to the need of the application.

The Page class creates a control tree of all the controls on the page. All the components on the page, except the directives are part of this control tree. 

ASP.NET Page Life Cycle Phases
  • Initialization
  • Instantiation of controls on the web page
  • Restoration and Maintenance of state
  • Execution of the Event Handler code
  • Page Rendering

ASP.NET Page Life Cycle Stages
  • Page Request – The ASP.NET page life cycle (PLC) begins after the page is requested by a user. ASP.NET then determines whether the web page needs to be parsed and compiled, or a cached version of the page can be sent in response without running the page.
  • Start – The page properties such as Request and Response are set at the Start stage. It is determined whether the request is a postback (old request) or a new request and IsPostBack property of the Page is set accordingly. The UICulture property of the Page is also set at this stage.

      a) PreInit – Raised after the Start stage is complete and before the Initialization stage begins 
  • Initialization – The controls on the web page are available during page initialization, and UniqueID property of each control is set. If applicable, master page and themes are also applied to the page during initialization. If the current request is a postback, the postback data has not yet been loaded and control property values have not been restored to the values from view state.

      a) InitRaised after all controls have been initialized and any skin settings have been applied. The Init event of individual controls occurs before the Init event of the page.
b) InitComplete – Raised at the end of the page's initialization stage. Only one operation takes place between the Init and InitComplete events: tracking of view state changes is turned on.
View state tracking enables controls to persist any values that are programmatically added to the ViewState collection. Until view state tracking is turned on, any values added to view state are lost across postbacks. Controls typically turn on view state tracking immediately after they raise their Init event.
  • Load – During load, if the current request is a postback, control properties are loaded with information recovered from view state and control state.

      a) PreLoad – Raised after the page loads view state for itself and all controls, and after it processes postback data that is included with the Request instance. 
      b) Load – The Page object calls the OnLoad method on the Page object, and then recursively does the same for each child control until the page and all controls are loaded. The Load event of individual controls occurs after the Load event of the page.
  • Postback event handlingIf the request is a postback, the event handlers of the controls are called. After that, the Validate method of all validator controls is called, which sets the IsValid property of individual validator controls and of the page. (There is an exception to this sequence: the handler for the event that caused validation is called after validation.)

      a) Control Events – These events should be used to handle specific control events, such as a Button control's Click event or a TextBox control's TextChanged event.
      In a postback request, if the page contains validator controls, check the IsValid property of the Page and of individual validation controls before performing any processing.

      b) Load Complete – Raised at the end of the event-handling stage.

      c) PreRender – Raised after the Page object has created all controls that are required in order to render the page, including child controls of composite controls. To do this, the Page object calls EnsureChildControls for each control and for the page.
      The Page object raises the PreRender event on the Page object, and then recursively does the same for each child control. The PreRender event of individual controls occurs after the PreRender event of the page.

      d) PreRender Complete – Raised after each data bound control whose DataSourceID property is set calls its DataBind method.

      e) SaveStateComplete - Raised after view state and control state have been saved for the page and for all controls. Any changes to the page or controls at this point affect rendering, but the changes will not be retrieved on the next postback.
  • RenderingThe view state is saved for the page and all controls before rendering. 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.

      a) Render - This is not an event; instead, at this stage of processing, the Page object calls this method on each control. All ASP.NET Web server controls have a Render method that writes out the control's markup to send to the browser. A user control (an .ascx file) automatically incorporates rendering, so you do not need to explicitly render the control in code. 
  • 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.

      a) Unload - Raised for each control and then for the page. During the unload stage, the page and its controls have been rendered, so you cannot make further changes to the response stream. If you attempt to call a method such as the Response.Write method, the page will throw an exception