Share via


OnPreRender(System.EventArgs) Method

The OnPreRender method of the WebPart class is 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.

Parameters

e   A System.EventArgs that contains the event data.

Remarks

If your Web Part needs to 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);

Requirements

Platforms: Windows Server 2003

Security: Code Access Security