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/d.../en-us/dnaspp/html/aspnet-pageobjectmodel.asp
for more information about the life cycle of an ASP.NET page.
HTH
----------------
Dave Fancher
http://www.davefancher.com
Scott M. said:
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.