WebPart.OnPreRender method

The event handler for the System.Web.UI.Control.PreRender event that occurs immediately before the Web Part is rendered to its containing Web Part Page.

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Protected Overrides Sub OnPreRender ( _
	e As EventArgs _
Dim e As EventArgs



Type: System.EventArgs

A System.EventArgs that contains the event data.

If your Web Part must perform any necessary prerendering steps before 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 constructor. For example:

this.PreRender += new EventHandler (MyPreRenderHandler);