Loading ...

OnPreRenderComplete Event?

Who is online?  0 guests and 0 members
home  »  forums   »  asp.net topics   »  getting started / general asp.net   » OnPreRenderComplete Event?

OnPreRenderComplete Event?

Posts under the topic: OnPreRenderComplete Event?

Posted: 7/6/2010

Contributor 2237  points  Contributor
  • Joined on: 9/24/2009
  • Posts: 172

Hello Experts,

There is a below event in ASP.NET page life cycle.

protected override void OnPreRenderComplete(EventArgs e)
    {
       
    }

 

Can anyone explain me what this event do?

 

Thanks in advance.


Posted: 7/7/2010

Professional 8093  points  Professional
  • Joined on: 4/15/2009
  • Posts: 423
  Answered

Hi,

As the documentation states:

"It Raises the PreRenderComplete  event after the OnPreRenderComplete  event and before the page is rendered.The OnPreRenderComplete  method is called when the prerendering stage of the page life cycle is complete. At this stage of the page life cycle, all controls are created and the page is ready to render the output. This is the last event called before the page's view state is saved."

Reference: http://msdn.microsoft.com/en-us/library/system.web.ui.page.onprerendercomplete.aspx


Posted: 7/7/2010

Professional 8495  points  Professional
  • Joined on: 5/3/2010
  • Posts: 389
  Answered

Vinz's post answers everything!

Moreover, I will add that you can even understand it by reading the name of the event OnPreRenderComplete - means, happens right before rendering the output of the web page.

"So, the controls are created waiting rendering the output :)."

You should be aware that there are many times when an Event lasts in a single moment - but thanks God, events have very descriptive names that explains half of the story :).


Posted: 7/8/2010

Contributor 2237  points  Contributor
  • Joined on: 9/24/2009
  • Posts: 172

Thank you Vinz and Hajan:)


Posted: 7/9/2010

Professional 8495  points  Professional
  • Joined on: 5/3/2010
  • Posts: 389

You are welcome, as always ;)


Page 1 of 1 (5 items)