(3)InitComplete Raised once all initializations of the page and its controls have been completed. Till now the viewstate values are not yet loaded, hence you can use this event to make changes to view state that you want to make sure are persisted after the next postback
EXAMPLE : Override the event as given below in your code-behind cs file of your aspx page
protected void Page_InitComplete(object sender, EventArgs e) {// Raised by the Page object. Use this event for processing tasks that require all initialization be complete. }
(4)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
(1)Loads ViewState : ViewState data are loaded to controls
Note : The page viewstate is managed by ASP.NET and is used to persist information over a page roundtrip to the server. Viewstate information is saved as a string of name/value pairs and contains information such as control text or value. The viewstate is held in the value property of a hidden <input> control that is passed from page request to page request.
(2)Loads Postback data : postback data are now handed to the page controls
Note : During this phase of the page creation, form data that was posted to the server (termed postback data in ASP.NET) is processed against each control that requires it. Hence, the page fires the LoadPostData event and parses through the page to find each control and updates the control state with the correct postback data. ASP.NET updates the correct control by matching the control’s unique ID with the name/value pair in the NameValueCollection. This is one reason that ASP.NET requires unique IDs for each control on any given page.
EXAMPLE : Override the event as given below in your code-behind cs file of your aspx page
protected override void OnPreLoad(EventArgs e) {// Use this event if you need to perform processing on your page or control before the Load event. // Before the Page instance raises this event, it loads view state for itself and all controls, and then processes any postback data included with the Request instance. }
Similar Topics:
- Microsoft Sharepoint persisting webpart property values
- Asp.net file compression using opensource library
- Javascript Treeview Checkbox Check All function
- Concept of OOPS in C#
- Singleton pattern – Design pattern
- Enabling IIS6 HTTP compression on SharePoint dynamic page
- Email asp net Sending email using godaddy hosting account
- Microsoft Sharepoint SystemUpdate and Update using object model
- Outlook Web Access corrupts HTML attachments
- Asp.net sending email with zip file as attachment