The Page_Init event is the first to occur when an ASP.NET page is executed. This is where you perform any initialization steps that you need to set up or create instances of server controls. You can't access controls in this event because there is no guarantee that they have been created yet. Controls are created during this event, and you can control whether your attempt to use these objects will be denied by the server processing your request.
The Page_Init event fires only the first time the page is loaded. When you postback to any page, the Page_Init event doesn't fire.
The Page_Load event fires each time the page loads, postback or not.
This event occurs only when all the objects on the page have been created and are available for use.
Asked In: Many Interviews |