The event handler for the System.Web.UI.Control.PreRender event that occurs immediately before the Web Part is rendered to the Web Part Page it is contained on.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
If your Web Part must perform any necessary prerendering steps prior to saving the view state and rendering content during the System.Web.UI.Control.PreRender event, you can add an appropriate event handler to the Web Part's constructor. For example:
this.PreRender += new EventHandler (MyPreRenderHandler);