The earliest event at which ViewState available

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • witnes
    New Member
    • Jul 2006
    • 4

    The earliest event at which ViewState available

    Who can say when the ViewState the earliest event is available. When I look into msdn I found this events sequence:
    1. Instantiate
    2. Initialize
    3. TrackViewState
    4. LoadViewState (postback)
    5. Load postback data (postback, IPostBackDataha ndler.LoadPostd ata)
    6. Load
    7. Load postback data for dynamical controls added on Page_Load
    8. Raise Changed Events (postback,
    IPostBackDataha ndler.RaisePost DataChanged)
    9. Raise postback event (postback, IPostBackEventH andler.RaisePos tBackEvent)
    10.PreRender
    11. SaveViewState
    12. Render
    13. Unload
    14. Dispose

    so, looks like viewstate is available after page_load event. Is it correct?
  • witnes
    New Member
    • Jul 2006
    • 4

    #2
    According to http://www.geekinterview.com/question_details/66728 the ViewState is available in page_load event.

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      ViewState for the is loaded right after the Page Init Event occurs.
      See the Microsoft's MSDN article on the ASP.NET Page Life Cycle

      -Frinny

      Comment

      Working...