Friday, 1 August 2014

web part life cycle on Page load and button click

Web Part Life Cycle on page load

  1. OnInit
  2. OnLoad
  3. Connection Consuming
  4. CreateChildControls
  5. OnPreRender
  6. Render (RenderContents, etc)

Web Part Life Cycle on button click

  1. OnInit
  2. CreateChildControls
  3. OnLoad
  4. Click Event Handling
  5. Connection Consuming
  6. OnPreRender
  7. RenderContents

2 comments:

  1. Hey prabhakar thank you for the post. Is there a way to invert Click Event Handling with Connection Consuming? Or to force the Connection Consuming in Page Load?

    ReplyDelete
  2. Hi..you cannot change the order of the lifecycle events. It agree that it would make life a lot easier but your best option would be to store the data in a temporary cache.. regards, Prabhakar Reddy

    ReplyDelete