GeekInterview.com
Results 1 to 2 of 2

What is the purpose of having a Page_Init()

This is a discussion on What is the purpose of having a Page_Init() within the Web Development forums, part of the category; Dear Friends, Kindly let me know the use of page_init() event handler. We already have page_load() event handler then why again do we need another event handler such as page_init() ...

  1. #1
    Jimmy Zorald is offline Junior Member Array
    Join Date
    Jan 2006
    Answers
    19

    What is the purpose of having a Page_Init()

    Dear Friends,

    Kindly let me know the use of page_init() event handler. We already have page_load() event handler then why again do we need another event handler such as page_init() which is almost similar in functionality.


  2. #2
    Sandhya.Kishan is offline Expert Member Array
    Join Date
    Mar 2012
    Answers
    212

    Re: What is the purpose of having a Page_Init()

    When an ASP page is created the page_init() event occurs first.The page_init() event fires only the first time the page is loaded and the event doesn't fire when any page is postedback.
    When all the objects on the page have been created and are available for use then page_load event occurs.The Page_Load event fires each time the page loads, postback or not.