ControlAdapter.OnPreRender(EventArgs) Method

Definition

Overrides the OnPreRender(EventArgs) method for the associated control.

C#
protected internal virtual void OnPreRender(EventArgs e);

Parameters

e
EventArgs

An EventArgs that contains the event data.

Remarks

If there is an adapter attached to a Control object and the OnPreRender method is overridden, the override method is called instead of the Control.OnPreRender method.

Override the OnPreRender method to perform target-specific processing in the PreRender stage of the control lifecycle. Typically, these are functions that immediately precede rendering of the control output.

Notes to Inheritors

When you inherit from the ControlAdapter class and the adapter overrides the OnPreRender(EventArgs) method, the adapter must call the corresponding base class method, which in turn calls the OnPreRender(EventArgs) method. If the OnPreRender(EventArgs) method is not called, the PreRender event will not be raised.

Applies to

Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also