ListBox.OnPreRender(EventArgs) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Configures the ListBox control prior to rendering on the client.
protected:
override void OnPreRender(EventArgs ^ e);
protected public:
override void OnPreRender(EventArgs ^ e);
protected override void OnPreRender (EventArgs e);
protected internal override void OnPreRender (EventArgs e);
override this.OnPreRender : EventArgs -> unit
Protected Overrides Sub OnPreRender (e As EventArgs)
Protected Friend Overrides Sub OnPreRender (e As EventArgs)
Parameters
Remarks
The OnPreRender method is used primarily by control developers, when deriving a custom control from the ListBox class. The OnPreRender method allows derived classes to handle the PreRender event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
The OnPreRender method performs any necessary prerendering steps prior to saving view state and rendering content for the ListBox.
Notes to Inheritors
When overriding the OnPreRender(EventArgs) method in a derived class, be sure to call the OnPreRender(EventArgs) method of the base class so that registered delegates receive the event.