Skip to main content

Posts

Showing posts with the label Ordering of event of page

ASP.Net Page Life Cycle

When the page is requested by a user, ASP.NET determines whether the page needs to be parsed and compiled, or whether a cached version of the page can be sent in response without running the page. At each stage of the page life cycle, the page raises some events, which could be coded. Following are the page life cycle events: PreInit: PreInit is the first event in page life cycle and raised before the initialization stage begins. Use this event for the following:  Check the IsPostBack property to determine whether this is the first time the page is being processed. If the request is a postback, the values of the controls have not yet been restored from view state. If you set a control property at this stage, its value might be overwritten in the next event. The IsCallback and IsCrossPagePostBack properties have also been set at this time. Create or re-create dynamic controls. Set a master page & theme property dynamically. R...