OnPreRender is indeed an event raised as part of the page life-cycle. The
page's OnPreRender method may be overridden or a delegate may be used to
define an Event Handler in a manner similar to Page_Load and Page_Init.
[C#]
protected override void OnPreRender(System.EventArgs e)
{
// PreRender code
base.OnPreRender();
}
or
this.PreRender += new System.EventHandler(Page_PreRender);
OnPreRender is typically used for handling some last minute tasks such as
enabling or disabling controls or modifying other content after control
events have been handled but before the viewstate is saved and the HTML is
rendered [generated].
I'll refer you to
http://msdn.microsoft.com/library/de...bjectmodel.asp
for more information about the life cycle of an ASP.NET page.
HTH
----------------
Dave Fancher
http://www.davefancher.com
"Scott M." <No****@NoSpam.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Pre-render isn't an event, it's a "stage" that a page instance goes
through Page_Init and Page_Load both occur during this stage.
"Daniel Groh" <ne*********@gmail.com> wrote in message
news:OM**************@TK2MSFTNGP12.phx.gbl... Hi, i'd like to know more abou this event, i tryed to found in MSDN but
the explanation is null for me...is there some explanation when and how
should i use it ?