My Development Notes

By Haemoglobin
4/12/2010 (revision 31)

Areas

HTTP Status Codes

Status CodeReason
100Continue
200OK
201Created
300Multiple Choices
301Moved Permanently
302Found
400Bad Request
401Unauthorized
403Forbidden
404Not Found
407Proxy Authentication Required
408Request Time-out
413Request Entity Too Large
500Internal Server Error
501Not Implemented

ASP.NET Object Hierarchy

 Control
  |_WebControl
  |_HtmlControl (any standard HTML element can be accessed from code by adding runat="server")
  |_TemplateControl (INamingContainer)
    |_Page (IHttpHandler)

INamingContainer

The naming container for a particular control is the first control above it in the hierarchy that implemented INamingContainer. A naming container creates a unique namespace when populating the UniqueID field of controls (a fully qualified name based of the ID property).

The NamingContainer.FindControl(controlID) method searches recursively but does not enter other naming containers.

ASP.NET Lifecycle

EventDescription
PreInitUse when dynamically creating controls.
InitFires after control is initialized, use this event to change initialization values.
InitCompleteRaised once all initializations are complete on the page and controls.
PreLoadFired before view state has been loaded and PostBack processing.
LoadAll controls have been initialized and view state loaded at this time. Page load event called first and then each controls Load event recursively.
Control (PostBack event(s))ASP.NET fires events on the page or controls that caused the postback to occur.
LoadCompleteAll controls are loaded.
PreRenderAllows final changes to the page or control. Occurs before the saving of ViewState so changes made here are saved.
SaveStateCompleteViewState saved. Changes made to controls here are ignored.
RenderA method not an event. ASP.NET calls this recursively on the page and all controls.
UnLoadCan be used for cleanup code to release any unmanaged resources.

Note that when controls are added dynamically - the above events are all executed sequentially until they catch up to the current stage of their container (typically the page).

Security

Deployment


Comments