Version

OnPreRender Method (SmartWebControl)

Fires the PreRender event and registers blocks of content ahead of rendering.
Syntax
'Declaration
 
Protected Overrides Sub OnPreRender( _
   ByVal e As EventArgs _
) 
protected override void OnPreRender( 
   EventArgs e
)

Parameters

e
An EventArgs or object derived from EventArgs containing information that will be conveyed to interested parties subscribing to the PreRender event on this element.
Remarks

Some of the content that the SmartWebControl implementation of OnPreRender takes care of are the registering of <script> blocks, the initialization of global objects and property arrays within Javascript, and the emission of a <style> block defining common CSS styles when required.

Inheritors may override this method to handle the PreRender event internally (without adding an event handler) and/or provide additional processing before rendering starts. An override must call the base method. Failure to call the base method will lead to subscribers of the PreRender event not receiving notification that the event has fired, and possible failure to emit necessary <script> and <style> blocks leading to script errors and an absence of expected styling, respectively.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also