In page-init, view state and some other components don’t get loaded. Which are they?
Why do they loaded in Page-Load only? What does the need of Page-Init then ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Page_Init:
Fired when page is initialised. This includes postbacks. All server controls are created to their initial, unaltered state. First step in page lifecycle, controls are organized hierarchically.
Page_Load:
Controls fully loaded, if the page is a postback, then the controls are loaded with their viewstate.
In other words, Viewstate only comes into effect on Page_Load, where (if Viewstate is enabled for the control/page), the controls previous state is reloaded.
Hope that helps.